Show Invisible Characters in Vim

Show whitespace and tabs while editing in Vim

* This page contains promotional content

Once you get used to Python layout and Markdown, there are times you want Vim to visualize blank lines and tabs.

Show them temporarily in Vim

: set list
: set listchars=tab-,trail:-,eol:↲,extends,precedes,nbsp:%,space:_

Show them permanently

Add the following to ~/.vimrc

set list
set listchars=tab-,trail:-,eol:↲,extends,precedes,nbsp:%,space:_

Turn the display back off

Inside Vim,

:set nolist

Reference

[Changing listchars colors for tabs, spaces, newlines, and so on in Vim (in Japanese)] (https://qiita.com/pollenjp/items/459a08a2cc59485fa08b )

ItemDescription
set listShow invisible characters
set listcharsConfigure which characters to use
tabShow tab characters
trailShow trailing spaces
eolShow newlines
spaceShow spaces
Vim