Add GV.vim-style q mapping
This commit is contained in:
parent
8b45742540
commit
52b68b4e62
11
plug.vim
11
plug.vim
|
@ -935,7 +935,7 @@ function! s:prepare(...)
|
||||||
call s:new_window()
|
call s:new_window()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
nnoremap <silent> <buffer> q :if b:plug_preview==1<bar>pc<bar>endif<bar>bd<cr>
|
nnoremap <silent> <buffer> q :call <SID>close_pane()<cr>
|
||||||
if a:0 == 0
|
if a:0 == 0
|
||||||
call s:finish_bindings()
|
call s:finish_bindings()
|
||||||
endif
|
endif
|
||||||
|
@ -957,6 +957,15 @@ function! s:prepare(...)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:close_pane()
|
||||||
|
if b:plug_preview == 1
|
||||||
|
pc
|
||||||
|
let b:plug_preview = -1
|
||||||
|
else
|
||||||
|
bd
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! s:assign_name()
|
function! s:assign_name()
|
||||||
" Assign buffer name
|
" Assign buffer name
|
||||||
let prefix = '[Plugins]'
|
let prefix = '[Plugins]'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user