Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I have multiline statusline in Vim?

Tags:

vim

statusline

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.

like image 590
Peter Kovac Avatar asked Nov 02 '11 20:11

Peter Kovac


2 Answers

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.

like image 177
Rook Avatar answered Oct 15 '22 07:10

Rook


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

like image 23
greduan Avatar answered Oct 15 '22 07:10

greduan