Displaying all your tab characters in Vim

I usually use :set expandtab in Vim, but a particular file I was editing required explicit tab characters. So I set :noexpandtab, but then realized I couldn’t tell which were tabs, and which were spaces. Easy fix:

:set list
:set listchars=tab:\|\<Space>

…where <Space> is a literal space. Thanks again to the Vim Wiki!

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s