Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 7 down vote accepted

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.

share|improve this answer
    
Thank you. I ended up going for this: au BufReadPost quickfix setlocal colorcolumn=0 which seems to work great. Thanks :) – jordelver Mar 12 '13 at 12:00

You must log in to answer this question.

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