I've been trying to set a custom statusline for help files. I tried:
set statusline=%!StatusLine() function! StatusLine() if &ft == 'help' let b:status = "%#error#[HELP]%*" else let b:status = "my usual statusline" endif return b:status endfunction
but when a help window is open, both statuslines become
[HELP] when that window is in focus, and my usual statusline when the main file is open. I tried using
setlocal statusline=%!StatusLine(), but then nothing gets set for the help file and the main file statusline still becomes
What am I missing here?