Skip to content

Instantly share code, notes, and snippets.

@hanxi
Created January 25, 2019 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hanxi/cfbbfd79d1d263223bb345409bda43f3 to your computer and use it in GitHub Desktop.
Save hanxi/cfbbfd79d1d263223bb345409bda43f3 to your computer and use it in GitHub Desktop.
function! ClosePluginWindow()
" Close quickfix
cclose
" Close Leaderf Buffer
redir => message
silent execute "ls!"
redir END
let l:buflist = split(message, '\n')
for l:one in l:buflist
let l:items = split(l:one, '"')
if match(l:items[0], "u*a-") >= 0
let l:bufid = matchstr(l:items[0], '\d\+')
exe 'bd! '.l:bufid
endif
endfor
endfunction
" 关闭插件窗口
map <C-C><C-C> :call ClosePluginWindow()<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment