How can set BufEnter or WinEnter autocmds for entering quickfix window?
I tried
autocmd WinEnter quickfix echo 'winenter'
autocmd BufEnter quickfix echo 'bufenter'
None of them works. I doubt that it is because these two commands needs file name after the event name. Then what is the file pattern for quickfix window?
I have fugitive installed. By filling the quickfix window using Glog
, the statusline for the quickfix window shows something like [:git --git-dir=...] [Quickfix List]
. Is this the filename of the quickfix buffer which should be used in the pattern of the BufEnter/WinEnter
event?
I cannot see anything if I echo @%
which should usually show the current bufname.
autocmd Filetype qf ...
may work as well