Created
March 5, 2012 10:34
-
-
Save AndrewRadev/1977793 to your computer and use it in GitHub Desktop.
Mapping to toggle the quickfix window on and off
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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