In January I wrote about my Vim statusline, explaining all its parts and why they're enough for me not to care about using something like Airline.
Since then I've realized:
In light of this, I removed a lot of cruft and am much happier with the result, and I'd like to share it here:
set statusline=
set statusline+=%F " file path
set statusline+=\
set statusline+=%{ReadonlyForStatusline()} " readonly ([!])
set statusline+=\
set statusline+=%m " modified ([+])
set statusline+=%= " right-align from here
set statusline+=%{PasteForStatusline()} " paste ([p])
set statusline+=\
set statusline+=[%{ALEGetStatusLine()}] " ALE
Here's what it looks like:
Yep, that's the whole thing. Here are the ingredients:
[!]
if the file is read-only[+]
if the file has been modified but not saved[p]
if paste mode is enabled[x3 !5]
/[OK]
):x
for errors!
for warningsOK
if all is well