Skip to content

Instantly share code, notes, and snippets.

@AndrewRadev
Created March 5, 2012 10:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewRadev/1977793 to your computer and use it in GitHub Desktop.
Save AndrewRadev/1977793 to your computer and use it in GitHub Desktop.
Mapping to toggle the quickfix window on and off
nnoremap <Plug>ToggleQf :call <SID>ToggleQf()<cr>
function! s:ToggleQf()
for buffer in tabpagebuflist()
if bufname(buffer) == ''
" then it should be the quickfix window
cclose
return
endif
endfor
copen
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment