Nik Kantar

Monday, April 17, 2017
2 min read

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:


Tags: vim

Thanks for reading! You can keep up with my writing via the feed or newsletter, or you can get in touch via email or Mastodon.


Older:
Programmer, Developer, Engineer, Lexicographer
Newer:
Introducing Starminder