Nik Kantar

Monday, April 17, 2017

My New Vim Statusline

I realized my statusline was still bloated, so I trimmed it even more.

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:

  1. I don't actually read almost any of it, ever;
  2. There's a single command that deprecates three different parts at once.

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:

New Vim statusline

Yep, that's the whole thing. Here are the ingredients: