Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 399
Eric Francis Avatar asked Sep 15 '15 14:09

Eric Francis


2 Answers

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.

like image 92
qiubix Avatar answered Sep 20 '22 14:09

qiubix


Airline is telling you that on line 1 you have trailing whitespace, which is usually something you want to get rid of.

So go to the line and delete it (1G$gelD).

It’s a good feature, but you can turn it on/off with:

:AirlineToggleWhitespace 

More info on trailing whitespace here.

like image 28
Micah Elliott Avatar answered Sep 16 '22 14:09

Micah Elliott