Some time ago I completely got rid of the status line. Vertical space is a scarcity in the modern HD world. The only thing I missed from it is an ability to see what file I'm working with. So I'm looking for a way of displaying it in the command line.
I tried to change the ruler to something like:
set rulerformat=%60(%=%f\ %P%). It's essentially works. But when a window is smaller than those 60 characters, the ruler takes all the space. So I can't see error messages, which appears on the left side of the command line. And I couldn't find a way to display left-side content on top of the ruler.
The current way I use - is printing filename after changing a buffer. I'm ok with it being rewritten by a command or an error afterwards:
" Automatically show current file name in the command line
" TODO: after :wq the name is printed in the buffer we're leaving after the
" message about its successful writing
" I've tried: BufEnter, WinEnter, TabEnter
autocmd BufEnter * echo @% =~ '^\/.*$' ? @% : './' . @%
It works almost perfect except of the case of
:wq, when filename is printed after the writing message and as there's more than a single line, I'm getting the
Press ENTER or type command to continue. It's not critical, but still, a bit annoying.
So my question is if you have any suggestions how to fix one of described approaches or if there's a better one?