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?

Ned Batchelder
  • 364,293
  • 75
  • 561
  • 662
  • 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\"` – wxz Feb 05 '21 at 05:13

2 Answers2

7

This should work

autocmd Filetype qf setlocal statusline=\ %n\ \ %f%=%L\ lines\ 
Ned Batchelder
  • 364,293
  • 75
  • 561
  • 662
Nuz
  • 409
  • 3
  • 4
0

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).

Ves
  • 1,212
  • 1
  • 9
  • 19