4

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

1 Answer 1

7

Vim also sets the 'filetype' to qf 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 the QuickFixCmdPost event with an :autocmd.

1
  • Thank you. I ended up going for this: au BufReadPost quickfix setlocal colorcolumn=0 which seems to work great. Thanks :)
    – jordelver
    Mar 12, 2013 at 12:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .