diff --git a/autoload/SpaceVim/mapping/leader.vim b/autoload/SpaceVim/mapping/leader.vim index 6516ee54c..703651913 100644 --- a/autoload/SpaceVim/mapping/leader.vim +++ b/autoload/SpaceVim/mapping/leader.vim @@ -132,56 +132,112 @@ function! SpaceVim#mapping#leader#defindWindowsLeader(key) abort \ :vsplit:wincmd w let lnum = expand('') + s:lnum - 4 let g:_spacevim_mappings_windows.p = ['vsplit | wincmd w', - \ 'vsplit vertically,switch to next window', - \ [ - \ '[WIN p ] is to split windows vertically, switch to the new window', - \ '', - \ 'Definition: ' . s:file . ':' . lnum, - \ ] - \ ] + \ 'vsplit vertically,switch to next window', + \ [ + \ '[WIN p ] is to split windows vertically, switch to the new window', + \ '', + \ 'Definition: ' . s:file . ':' . lnum, + \ ] + \ ] nnoremap [Window]v \ :split let lnum = expand('') + s:lnum - 4 let g:_spacevim_mappings_windows.v = ['split', - \ 'split window', - \ [ - \ '[WIN v ] is to split windows, switch to the new window', - \ '', - \ 'Definition: ' . s:file . ':' . lnum, - \ ] - \ ] + \ 'split window', + \ [ + \ '[WIN v] is to split windows, switch to the new window', + \ '', + \ 'Definition: ' . s:file . ':' . lnum, + \ ] + \ ] nnoremap [Window]g \ :vsplit + let lnum = expand('') + s:lnum - 4 let g:_spacevim_mappings_windows.g = ['vsplit', - \ 'vsplit window'] + \ 'vsplit window', + \ [ + \ '[WIN g] is to split windows vertically, switch to the new window', + \ '', + \ 'Definition: ' . s:file . ':' . lnum, + \ ] + \ ] nnoremap [Window]t \ :tabnew + let lnum = expand('') + s:lnum - 4 let g:_spacevim_mappings_windows.t = ['tabnew', - \ 'create new tab'] + \ 'create new tab', + \ [ + \ '[WIN t] is to create new tab', + \ '', + \ 'Definition: ' . s:file . ':' . lnum, + \ ] + \ ] nnoremap [Window]o \ :only + let lnum = expand('') + s:lnum - 4 let g:_spacevim_mappings_windows.o = ['only', - \ 'Close other windows'] + \ 'Close other windows', + \ [ + \ '[WIN o] is to close all other windows', + \ '', + \ 'Definition: ' . s:file . ':' . lnum, + \ ] + \ ] nnoremap [Window]x \ :call zvim#util#BufferEmpty() + let lnum = expand('') + s:lnum - 4 let g:_spacevim_mappings_windows.x = ['call zvim#util#BufferEmpty()', - \ 'Empty current buffer'] + \ 'Empty current buffer', + \ [ + \ '[WIN x] is to empty current buffer', + \ '', + \ 'Definition: ' . s:file . ':' . lnum, + \ ] + \ ] nnoremap [Window]\ \ :b# + let lnum = expand('') + s:lnum - 4 let g:_spacevim_mappings_windows['\'] = ['b#', - \ 'Switch to the last buffer'] + \ 'Switch to the last buffer', + \ [ + \ '[WIN \] is to switch to the last buffer', + \ '', + \ 'Definition: ' . s:file . ':' . lnum, + \ ] + \ ] nnoremap [Window]Q \ :close + let lnum = expand('') + s:lnum - 4 let g:_spacevim_mappings_windows.Q = ['close', - \ 'Close current windows'] + \ 'Close current windows', + \ [ + \ '[WIN Q] is to close current windows', + \ '', + \ 'Definition: ' . s:file . ':' . lnum, + \ ] + \ ] nnoremap [Window]q \ :call SpaceVim#mapping#close_current_buffer() + let lnum = expand('') + s:lnum - 4 let g:_spacevim_mappings_windows.q = ['call SpaceVim#mapping#close_current_buffer()', - \ 'delete current windows'] + \ 'delete current windows', + \ [ + \ '[WIN q] is to delete current windows', + \ '', + \ 'Definition: ' . s:file . ':' . lnum, + \ ] + \ ] nnoremap [Window]c \ :call SpaceVim#mapping#clearBuffers() + let lnum = expand('') + s:lnum - 4 let g:_spacevim_mappings_windows.c = ['call SpaceVim#mapping#clearBuffers()', - \ 'Clear all the buffers'] + \ 'Clear all the buffers', + \ [ + \ '[WIN c] is to clear all the buffers', + \ '', + \ 'Definition: ' . s:file . ':' . lnum, + \ ] + \ ] endif endfunction