Can I give the quick fix window a different status line in vim?
Asked Answered
S

2

6

I'd like to give the Quick Fix window a different status line than all my other windows.

I want it to have:

set statusline=\ %n\ \ %f%=%L\ lines\ 

When I'm in the quick fix window, I can use :setlocal, but how in my .vimrc can I make it have a different status line?

Shortterm answered 29/8, 2010 at 1:34 Comment(1)
I didn't get this to work for my own status line string because I used quotes: set statusline="my status" Instead I had to use the format similar to the OP's question: set statusline=my\ status If you want quotes to be in your status lines: set statusline=he\ said\ \"hello\"Chickabiddy
A
7

This should work

autocmd Filetype qf setlocal statusline=\ %n\ \ %f%=%L\ lines\ 
Ashanti answered 29/8, 2010 at 8:42 Comment(1)
Thanks. I only had to change "set" to "setlocal", and it's just what I wanted.Shortterm
P
1

QuickFix window has filetype qf (see :help filetype), so you can add a line:

setlocal statusline=\ %n\ \ %f%=%L\ lines\

to appropriate qf.vim (see :help ftplugin-overrule).

Pegu answered 7/9, 2011 at 11:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.