mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 20:20: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')
|
call SpaceVim#mapping#guide#register_prefix_descriptions('', 'g:leaderGuide_map')
|
||||||
endif
|
endif
|
||||||
call SpaceVim#mapping#leader#defindglobalMappings()
|
call SpaceVim#mapping#leader#defindglobalMappings()
|
||||||
|
call SpaceVim#mapping#space#init()
|
||||||
if g:spacevim_simple_mode
|
if g:spacevim_simple_mode
|
||||||
let g:spacevim_plugin_groups = ['core']
|
let g:spacevim_plugin_groups = ['core']
|
||||||
else
|
else
|
||||||
|
@ -394,7 +394,7 @@ function! s:updateStatusline() abort
|
|||||||
hi! LeaderGuiderName cterm=bold gui=bold guifg=#282828 guibg=#fe8019
|
hi! LeaderGuiderName cterm=bold gui=bold guifg=#282828 guibg=#fe8019
|
||||||
hi! LeaderGuiderSep2 cterm=bold gui=bold guifg=#fe8019 guibg=#3c3836
|
hi! LeaderGuiderSep2 cterm=bold gui=bold guifg=#fe8019 guibg=#3c3836
|
||||||
hi! LeaderGuiderFill guifg=#7c6f64 guibg=#3c3836
|
hi! LeaderGuiderFill guifg=#7c6f64 guibg=#3c3836
|
||||||
exe 'setlocal statusline=%#LeaderGuiderPrompt#\ Leader\ Guide:\ ' .
|
exe 'setlocal statusline=%#LeaderGuiderPrompt#\ Mapping\ Guide:\ ' .
|
||||||
\ '%#LeaderGuiderSep1#' .
|
\ '%#LeaderGuiderSep1#' .
|
||||||
\ '%#LeaderGuiderName#' .
|
\ '%#LeaderGuiderName#' .
|
||||||
\ SpaceVim#mapping#leader#getName(s:prefix_key)
|
\ SpaceVim#mapping#leader#getName(s:prefix_key)
|
||||||
@ -514,6 +514,8 @@ endif
|
|||||||
|
|
||||||
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(' ',
|
||||||
|
\ 'g:_spacevim_mappings_space')
|
||||||
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')
|
||||||
|
@ -287,6 +287,8 @@ function! SpaceVim#mapping#leader#getName(key) abort
|
|||||||
return '[unite]'
|
return '[unite]'
|
||||||
elseif a:key == g:spacevim_denite_leader
|
elseif a:key == g:spacevim_denite_leader
|
||||||
return '[denite]'
|
return '[denite]'
|
||||||
|
elseif a:key == ' '
|
||||||
|
return '[SPC]'
|
||||||
else
|
else
|
||||||
return '<leader>'
|
return '<leader>'
|
||||||
endif
|
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