SIDEBAR
»
S
I
D
E
B
A
R
«
Remove DOS Carriage Returns
November 1st, 2006 by pixel

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.


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

CAPTCHA * Time limit is exhausted. Please reload CAPTCHA.

%d bloggers like this: