Hari Krishna Dara wrote:
On Fri, 6 Oct 2006 at 3:55pm, Mike wrote:
On 10/6/06, Aaron Griffin <[EMAIL PROTECTED]> wrote:
On 10/6/06, Mike <[EMAIL PROTECTED]> wrote:
alternatively: is there a single command to toggle the quickfix
window, rather than issuing :copen and :ccl?
:help cwindow
The problem with :cwindow is that it depends on what is in the
quickfix window. I just want it to open or close, I don't care what
is in there.
There were a couple of suggested functions already, but an alternative way
to track if it is open or not (untested) is to listen to the quickfix
filetype and BufWipeout later.
au FileType quickfix :call <SID>QuickFixOpened(1)
let s:quickFixOpen = 0
function! s:QuickFixOpened(b)
if a:b
'au BufWipeout <buffer='.expand('<abuf>').'> call <SID>QuickFixOpened(0)'
I think the above line needs "exe" (without the quotes) in front
endif
let s:quickFixOpen = a:b
endfunction
Depending on the value of s:quickFixOpen, you can issue the appropriate
command.
Best regards,
Tony.