Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 5 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.