vim: setting different status line for split windows

Viewed 2243

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.

1 Answers
Related