Can I give the quick fix window a different status line in vim?
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?
This should work
autocmd Filetype qf setlocal statusline=\ %n\ \ %f%=%L\ lines\
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
).
精彩评论