I've been asked exactly what my Vim statusline says, since so many Vim users seem to expect everyone else to use Airline. Here's what it looks like, for reference:
And here's the relevant .vimrc
snippet:
set statusline=
set statusline+=%F " current file path
set statusline+=\ " blank space
set statusline+=%y " filetype
set statusline+=\ " blank space
set statusline+=%m " modified flag [+]
set statusline+=\ " blank space
set statusline+=%= " right-align from now on
set statusline+=%{PasteForStatusline()} " paste flag
set statusline+=\[%{mode()}\] " current mode
set statusline+=\ " blank space
set statusline+=%v " column number
set statusline+=\: " colon separator
set statusline+=%l " row number
set statusline+=\/ " slash separator
set statusline+=%L " number of rows
set statusline+=\ " blank space
set statusline+=%{winnr()} " buffer number
set statusline+=%#warningmsg# " Syntastic error flag
set statusline+=%{SyntasticStatuslineFlag()} " Syntastic error flag
set statusline+=%* " Syntastic error flag
Finally, let's run through the interesting pieces one by one:
html
/htmldjango
.[i]
, [v]
, and [V]
are what I mostly see here. Not as useful now as they were when I first added them.<Leader>
# is mapped to take me to the matching buffer, but I almost never use it, since <C-hjkl>
does the job fine for any sane number of buffers.mode()
and winnr()
are Vim built-ins and SyntasticStatusFlag()
is part of the plugin, but PasteForStatusLine()
is this:
function! PasteForStatusline()
let paste_status = &paste
if paste_status == 1
return " [paste] "
else
return ""
endif
endfunction
OK, "FAQ" is a bit facetious, but I'd like to preemptively answer a few at least tangentially related questions.
I rely on vim-gitgutter for the lines I'm interacting with, vimagit for creating commits, and the git
command line interface for everything else.
Alacritty is a really fast terminal emulator I quite like.
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.