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
If you no longer need to see whitespace and line terminators, type this in...
Here's an example from one of my personal projects. First a look at the file without whitespace visualisation:
Then, when whitespace is visualised...
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.
Hope you found this post useful...
...so please read on! I love writing articles that provide beneficial information,
tips and examples to my readers. All information on my blog is provided free of
charge and I encourage you to share it as you wish. There is a small favour I ask in return however -
engage in comments below, provide feedback, and if you see mistakes let me know.
If you want to show additional support and help me pay for web hosting and
domain name registration,
donations, no matter how small, are always welcome!
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...