5 Responses to “Quick vi tip: Show Hidden Characters”
Stephen Says:
You don’t need to post my response. I think you meant “:set list” and “:set nolist” instead of “set: list”. I got an error when I typed “set: list” and “:set: list”. Thought yuo might want to know so you can fix your post and save others the headache of figuring it out.
This post was very helpful never the less. Thanks!
February 16th, 2010 at 11:08 am
Eric Says:
Once you find the characters you want to remove you can use:
:%s///g to remove everything globally. The way to type those pesky special characters in vi (ie ^M) is to use ctrl-v then ctrl-m You then substitute the m for whatever letter you need.
Hope that helps!
March 10th, 2010 at 8:39 am
Eric Says:
Sorry the posting left out some of my characters. A sample of the above technique would be :%s/^M//g
Sorry for the mixup!
March 10th, 2010 at 8:42 am
About Chrispian












Thanks for this info on vi. I didn’t want to drag out the books and figure out which option it was again! I really needed this for file conversion between Mac OS and Windows OS (the infamous carriage return versus line feed issue). Thanks again!
July 30th, 2008 at 1:50 pm