Various plugins that I use load their own results into a buffer in the quickfix window. For example, ack.vim loads it's search results there.
I would like to turn off various things like spell checking and the 80 column line indicator when buffers are loaded into the quickfix window.
How do I detect that the buffer is loaded in the quickfix window?
UPDATE
I have this so far, which turns off the 80 column marker for quickfix windows.
au BufReadPost quickfix setlocal colorcolumn=0
Best Answer
Vim also sets the
'filetype'
toqf
for the quickfix buffer. Therefore, you can put your customizations into~/.vim/after/ftplugin/qf.vim
(assuming you have:filetype plugin on
), and it will be sourced automatically.If you need different settings depending on which command (e.g.
:make
vs:grep
) created the quickfix contents, you can alternatively hook into theQuickFixCmdPost
event with an:autocmd
.