mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 11:10:05 +08:00
Add desc for all windows command
This commit is contained in:
parent
6e0f62379e
commit
ace02b2bb6
@ -152,36 +152,92 @@ function! SpaceVim#mapping#leader#defindWindowsLeader(key) abort
|
|||||||
\ ]
|
\ ]
|
||||||
nnoremap <silent> [Window]g
|
nnoremap <silent> [Window]g
|
||||||
\ :<C-u>vsplit<CR>
|
\ :<C-u>vsplit<CR>
|
||||||
|
let lnum = expand('<slnum>') + s:lnum - 4
|
||||||
let g:_spacevim_mappings_windows.g = ['vsplit',
|
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 <silent> [Window]t
|
nnoremap <silent> [Window]t
|
||||||
\ :<C-u>tabnew<CR>
|
\ :<C-u>tabnew<CR>
|
||||||
|
let lnum = expand('<slnum>') + s:lnum - 4
|
||||||
let g:_spacevim_mappings_windows.t = ['tabnew',
|
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 <silent> [Window]o
|
nnoremap <silent> [Window]o
|
||||||
\ :<C-u>only<CR>
|
\ :<C-u>only<CR>
|
||||||
|
let lnum = expand('<slnum>') + s:lnum - 4
|
||||||
let g:_spacevim_mappings_windows.o = ['only',
|
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 <silent> [Window]x
|
nnoremap <silent> [Window]x
|
||||||
\ :<C-u>call zvim#util#BufferEmpty()<CR>
|
\ :<C-u>call zvim#util#BufferEmpty()<CR>
|
||||||
|
let lnum = expand('<slnum>') + s:lnum - 4
|
||||||
let g:_spacevim_mappings_windows.x = ['call zvim#util#BufferEmpty()',
|
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 <silent> [Window]\
|
nnoremap <silent> [Window]\
|
||||||
\ :<C-u>b#<CR>
|
\ :<C-u>b#<CR>
|
||||||
|
let lnum = expand('<slnum>') + s:lnum - 4
|
||||||
let g:_spacevim_mappings_windows['\'] = ['b#',
|
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 <silent> [Window]Q
|
nnoremap <silent> [Window]Q
|
||||||
\ :<C-u>close<CR>
|
\ :<C-u>close<CR>
|
||||||
|
let lnum = expand('<slnum>') + s:lnum - 4
|
||||||
let g:_spacevim_mappings_windows.Q = ['close',
|
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 <silent> [Window]q
|
nnoremap <silent> [Window]q
|
||||||
\ :<C-u>call SpaceVim#mapping#close_current_buffer()<CR>
|
\ :<C-u>call SpaceVim#mapping#close_current_buffer()<CR>
|
||||||
|
let lnum = expand('<slnum>') + s:lnum - 4
|
||||||
let g:_spacevim_mappings_windows.q = ['call SpaceVim#mapping#close_current_buffer()',
|
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 <silent> [Window]c
|
nnoremap <silent> [Window]c
|
||||||
\ :<C-u>call SpaceVim#mapping#clearBuffers()<CR>
|
\ :<C-u>call SpaceVim#mapping#clearBuffers()<CR>
|
||||||
|
let lnum = expand('<slnum>') + s:lnum - 4
|
||||||
let g:_spacevim_mappings_windows.c = ['call SpaceVim#mapping#clearBuffers()',
|
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
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user