vim-airline: what is "! trailing[1]"

Eric Francis picture Eric Francis · Sep 15, 2015 · Viewed 13.1k times · Source

At the right of my vim-airline display, I have ! trailing[1].

I'm assuming this means trailing whitespace of some sort, but how do I read what vim-airline is telling me and what am I supposed to do?

Answer

qiubix picture qiubix · Sep 15, 2015

That means you have a trailing whitespace on the first line ([1]).

You can add to your .vimrc the following:

set list          " Display unprintable characters f12 - switches
set listchars=tab:•\ ,trail:•,extends:»,precedes:« " Unprintable chars mapping

That'll display whitespace chars. You can toggle it with :set invlist.