mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 21:00:03 +08:00
Add delete action key binding (#3275)
This commit is contained in:
parent
f3df8b24df
commit
4a2edb3047
@ -189,6 +189,18 @@ function! s:denite_filter_my_settings() abort
|
||||
inoremap <silent><buffer> <S-Tab>
|
||||
\ <Esc><C-w>p:call cursor(line('.')-1,0)<CR><C-w>pA
|
||||
inoremap <silent><buffer><expr> <CR> denite#do_map('do_action')
|
||||
" @fixme use this key binding only for sources which has delete action
|
||||
inoremap <silent><buffer><expr> <C-d>
|
||||
\ <SID>delete_action()
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:delete_action() abort
|
||||
if SpaceVim#layers#core#statusline#denite_status("sources") =~# '^buffer'
|
||||
return denite#do_map('do_action', 'delete')
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user