Can I have multiline statusline in Vim?

2k views Asked by At

Is there any way to make the status line in Vim spanning across multiple lines (e.g. inserting a newline character or something similar)?

I'd like to have full path (%F) to the opened file in one line and some other info in next one because I'm frequently opening files within long paths and the full path "expands" over the whole status line, hiding all other indicators and flags. On the other hand I still want to see the full path to the current file.

I know I can set the upper limit on the width of the full path, e.g. %.40F, I just want to know if there is some other way for this.

2

There are 2 answers

0
Rook On BEST ANSWER

No, sorry. Statuslines cannot span over multiple lines.

You seem to know your way around statuslines, so I'll skip that part. One possible solution would be to put the filepath+filename in let's say, title, if you're on windows.

0
greduan On

There currently is a patch for Vim that is adding this. Check this Gist for it: https://gist.github.com/3158492

It is by the vim-jp GitHub organization (Japanese Vim users). It is currently only in Japanese, all the conversation that is, but jump to the end where I asked them some questions.

Hope this helps. :)