1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 05:50:05 +08:00

Hotfix: key binding guide is broken

This commit is contained in:
Shidong Wang 2020-12-20 21:18:42 +08:00
parent ebbdfcf5e9
commit 71754c14ab
2 changed files with 5 additions and 3 deletions

View File

@ -112,7 +112,7 @@ function! s:start_parser(key, dict) abort " {{{
if a:key ==# '[KEYs]' if a:key ==# '[KEYs]'
return return
endif endif
let key = a:key ==? g:spacevim_default_custom_leader ? ' ' : a:key let key = a:key ==? ' ' ? '<Space>' : a:key
0verbose let readmap = s:CMP.execute('map ' . key, 'silent') 0verbose let readmap = s:CMP.execute('map ' . key, 'silent')

View File

@ -34,8 +34,10 @@ function! SpaceVim#mapping#space#init() abort
if s:has_map_to_spc() if s:has_map_to_spc()
return return
endif endif
nnoremap <silent><nowait> [SPC] :<c-u>LeaderGuide g:spacevim_default_custom_leader<CR> if g:spacevim_default_custom_leader ==# '<Space>'
vnoremap <silent><nowait> [SPC] :<c-u>LeaderGuideVisual g:spacevim_default_custom_leader<CR> nnoremap <silent><nowait> [SPC] :<c-u>LeaderGuide ' '<CR>
vnoremap <silent><nowait> [SPC] :<c-u>LeaderGuideVisual ' '<CR>
endif
exe printf('nmap %s [SPC]', g:spacevim_default_custom_leader) exe printf('nmap %s [SPC]', g:spacevim_default_custom_leader)
exe printf('vmap %s [SPC]', g:spacevim_default_custom_leader) exe printf('vmap %s [SPC]', g:spacevim_default_custom_leader)
if !g:spacevim_vimcompatible && g:spacevim_enable_language_specific_leader if !g:spacevim_vimcompatible && g:spacevim_enable_language_specific_leader