diff --git a/autoload/SpaceVim/mapping/leader.vim b/autoload/SpaceVim/mapping/leader.vim index 378d93994..f835afa77 100644 --- a/autoload/SpaceVim/mapping/leader.vim +++ b/autoload/SpaceVim/mapping/leader.vim @@ -339,8 +339,9 @@ function! SpaceVim#mapping#leader#defindKEYs() abort call extend(g:_spacevim_mappings_prefixs['g'], g:_spacevim_mappings_g) let g:_spacevim_mappings_prefixs['z'] = {'name' : '+z prefix'} call extend(g:_spacevim_mappings_prefixs['z'], g:_spacevim_mappings_z) - let g:_spacevim_mappings_prefixs['\'] = {'name' : '+Leader prefix'} - call extend(g:_spacevim_mappings_prefixs['\'], g:_spacevim_mappings) + let leader = get(g:, 'mapleader', '\') + let g:_spacevim_mappings_prefixs[leader] = {'name' : '+Leader prefix'} + call extend(g:_spacevim_mappings_prefixs[leader], g:_spacevim_mappings) endfunction