mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:50:05 +08:00
Add space prefix mapping
This commit is contained in:
parent
859182900b
commit
c7e16fad03
@ -414,6 +414,7 @@ function! SpaceVim#end() abort
|
||||
call SpaceVim#mapping#guide#register_prefix_descriptions('', 'g:leaderGuide_map')
|
||||
endif
|
||||
call SpaceVim#mapping#leader#defindglobalMappings()
|
||||
call SpaceVim#mapping#space#init()
|
||||
if g:spacevim_simple_mode
|
||||
let g:spacevim_plugin_groups = ['core']
|
||||
else
|
||||
|
@ -394,7 +394,7 @@ function! s:updateStatusline() abort
|
||||
hi! LeaderGuiderName cterm=bold gui=bold guifg=#282828 guibg=#fe8019
|
||||
hi! LeaderGuiderSep2 cterm=bold gui=bold guifg=#fe8019 guibg=#3c3836
|
||||
hi! LeaderGuiderFill guifg=#7c6f64 guibg=#3c3836
|
||||
exe 'setlocal statusline=%#LeaderGuiderPrompt#\ Leader\ Guide:\ ' .
|
||||
exe 'setlocal statusline=%#LeaderGuiderPrompt#\ Mapping\ Guide:\ ' .
|
||||
\ '%#LeaderGuiderSep1#' .
|
||||
\ '%#LeaderGuiderName#' .
|
||||
\ SpaceVim#mapping#leader#getName(s:prefix_key)
|
||||
@ -514,6 +514,8 @@ endif
|
||||
|
||||
call SpaceVim#mapping#guide#register_prefix_descriptions('\',
|
||||
\ 'g:_spacevim_mappings')
|
||||
call SpaceVim#mapping#guide#register_prefix_descriptions(' ',
|
||||
\ 'g:_spacevim_mappings_space')
|
||||
call SpaceVim#mapping#guide#register_prefix_descriptions(
|
||||
\ g:spacevim_unite_leader,
|
||||
\ 'g:_spacevim_mappings_unite')
|
||||
|
@ -287,6 +287,8 @@ function! SpaceVim#mapping#leader#getName(key) abort
|
||||
return '[unite]'
|
||||
elseif a:key == g:spacevim_denite_leader
|
||||
return '[denite]'
|
||||
elseif a:key == ' '
|
||||
return '[SPC]'
|
||||
else
|
||||
return '<leader>'
|
||||
endif
|
||||
|
7
autoload/SpaceVim/mapping/space.vim
Normal file
7
autoload/SpaceVim/mapping/space.vim
Normal file
@ -0,0 +1,7 @@
|
||||
function! SpaceVim#mapping#space#init() abort
|
||||
nnoremap <silent><nowait> [SPC] :<c-u>LeaderGuide " "<CR>
|
||||
nmap <Space> [SPC]
|
||||
let g:_spacevim_mappings_space = {}
|
||||
let g:_spacevim_mappings_space.t = {'name' : 'Toggle editor visuals'}
|
||||
nnoremap <silent> [SPC]tn :<C-u>set nu!<CR>
|
||||
endfunction
|
Loading…
Reference in New Issue
Block a user