Vim: remove line numbers and colorcolumn from quickfix window

9

1

In my vimrc I have both set number and set colorcolumn=80, so now when I open a quickfix window, I see both line numbers and the color column. Is there some way to disable these settings for quickfix windows only? (If it matters, I'm on OSX using vim 7.3).

Thanks!

smessing

Posted 2012-10-31T05:37:17.633

Reputation: 193

Note that line numbers may be a bit useful with cc <line-number> of <line-number>G<enter> to jump to an error you see. – Ciro Santilli 新疆改造中心法轮功六四事件 – 2016-03-23T22:01:50.470

Answers

9

Put the following into ~/.vim/ftplugin/qf.vim:

setlocal nonumber
setlocal colorcolumn=

As long as you have filetype plugin support enabled, that should handle it.

qqx

Posted 2012-10-31T05:37:17.633

Reputation: 2 603

Worked perfectly! Thanks. I didn't know about this, very useful. – smessing – 2012-10-31T06:07:48.677

3

If you don't mind having an extra line in your ~/.vimrc instead:

au FileType qf setlocal nonumber colorcolumn=

svlasov

Posted 2012-10-31T05:37:17.633

Reputation: 143