mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 22:20:06 +08:00
Add keys in buffer transient state
This commit is contained in:
parent
d75ff533c7
commit
26a87d2fcc
@ -292,6 +292,42 @@ endfunction
|
||||
function! s:buffer_transient_state() abort
|
||||
let state = SpaceVim#api#import('transient_state')
|
||||
call state.set_title('Buffer Selection Transient State')
|
||||
call state.defind_keys({})
|
||||
call state.defind_keys(
|
||||
\ {
|
||||
\ 'layout' : 'vertical split',
|
||||
\ 'left' : [
|
||||
\ {
|
||||
\ 'key' : 'J',
|
||||
\ 'desc' : 'move text down',
|
||||
\ 'func' : '',
|
||||
\ 'cmd' : 'normal! "_ddp',
|
||||
\ 'exit' : 0,
|
||||
\ },
|
||||
\ ],
|
||||
\ 'right' : [
|
||||
\ {
|
||||
\ 'key' : 'n',
|
||||
\ 'desc' : 'next buffer',
|
||||
\ 'func' : '',
|
||||
\ 'cmd' : 'bnext',
|
||||
\ 'exit' : 0,
|
||||
\ },
|
||||
\ {
|
||||
\ 'key' : 'd',
|
||||
\ 'desc' : 'kill buffer',
|
||||
\ 'func' : '',
|
||||
\ 'cmd' : 'call SpaceVim#mapping#close_current_buffer()',
|
||||
\ 'exit' : 0,
|
||||
\ },
|
||||
\ {
|
||||
\ 'key' : 'q',
|
||||
\ 'desc' : 'quit',
|
||||
\ 'func' : '',
|
||||
\ 'cmd' : '',
|
||||
\ 'exit' : 1,
|
||||
\ },
|
||||
\ ],
|
||||
\ }
|
||||
\ )
|
||||
call state.open()
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user