开发者

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

开发者 https://www.devze.com 2023-01-13 06:44 出处:网络
I\'d like to give the Quick Fix window a different status line than all my other windows. I want it to have:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消