Vi(m) EditorIf you are like me you get alot of source/text files created in windows that are filled with the usual extra carriage return. To get rid of these stupid things it is a simple one line regular expression.

:1,$ s/^M$//g

Note: Make sure you create the ^M using CTRL+V and CTRL+M otherwise it won’t work.

Share
Categories: Tips & Tricks

pixel

Site Administrator

0 Comments

Leave a Reply