When I open 2 files with horizontal split, each windows has its own status line.
e.g. with command
vim -o a.txt b.txt
I will get status line as “a.txt” for first window, and “b.txt” for second window.
I need to invoke vim from command line, and I need to put a custom status line, and I want different status line for each window.
With
vim -o -c "set statusline=hello" a.txt b.txt
I am getting “hello” as status for both windows.
What should I do to get “hello” as status line for first window, and “world” for second window; when invoking vim from command line?
This command isn’t working:
vim -o -c "set statusline=hello" a.txt -c "set statusline=world" b.txt
Please help.
You can use
setlocalcommand:Type
:help 'stl'We can see that:
stlis aglobal or local to windowoption.So,
:setl stl=hellowill set a status-line which is local to current window.