mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 06:30:03 +08:00
Fix leader mapping
This commit is contained in:
parent
39fe17058b
commit
32d52c4db5
@ -512,10 +512,15 @@ if !exists("g:leaderGuide_displayfunc")
|
|||||||
let g:leaderGuide_displayfunc = [function("s:leaderGuide_display")]
|
let g:leaderGuide_displayfunc = [function("s:leaderGuide_display")]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if get(g:, 'mapleader', '\') == ' '
|
||||||
|
call SpaceVim#mapping#guide#register_prefix_descriptions(' ',
|
||||||
|
\ 'g:_spacevim_mappings')
|
||||||
|
else
|
||||||
call SpaceVim#mapping#guide#register_prefix_descriptions('\',
|
call SpaceVim#mapping#guide#register_prefix_descriptions('\',
|
||||||
\ 'g:_spacevim_mappings')
|
\ 'g:_spacevim_mappings')
|
||||||
call SpaceVim#mapping#guide#register_prefix_descriptions(' ',
|
call SpaceVim#mapping#guide#register_prefix_descriptions(' ',
|
||||||
\ 'g:_spacevim_mappings_space')
|
\ 'g:_spacevim_mappings_space')
|
||||||
|
endif
|
||||||
call SpaceVim#mapping#guide#register_prefix_descriptions(
|
call SpaceVim#mapping#guide#register_prefix_descriptions(
|
||||||
\ g:spacevim_unite_leader,
|
\ g:spacevim_unite_leader,
|
||||||
\ 'g:_spacevim_mappings_unite')
|
\ 'g:_spacevim_mappings_unite')
|
||||||
|
@ -52,8 +52,5 @@ function! SpaceVim#mapping#space#def(m, keys, cmd, desc, is_cmd) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:has_map_to_spc() abort
|
function! s:has_map_to_spc() abort
|
||||||
if !exists('s:flag')
|
return get(g:, 'mapleader', '\') == ' '
|
||||||
let s:flag = !empty(maparg('<space>', '',0,1))
|
|
||||||
endif
|
|
||||||
return s:flag
|
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user