Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

If you tend to use vi for editing text files you've probably had a need to look for whitespace characters such as spaces or tabs. These are not typically visible since, well, they are empty space essentially. In vi there is an option to show these characters so you can quickly tell what's a space and what's a tab. In addition this option will show the start of the line (^) and end of the line ($) using their standard regex characters.

To enable this option, type in the following in vi...
 vi
:set list


If you no longer need to see whitespace and line terminators, type this in...
 vi
:set nolist




Here's an example from one of my personal projects. First a look at the file without whitespace visualisation:
visetlist1.png


Then, when whitespace is visualised...
visetlist3.png


You can see where tab stops are (represented by ^I). Spaces remain as spaces. You can also see where a beginning and end of line are.

-i

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.