Thursday, April 25, 2013

Vim tip: Show ^M and remove it


Vim tip: Show ^M and remove it

-- or replace CRLF with LF
-- or replace 0d0a with 0a
-- or replace DOS line ending with Linux line ending

Display CRLF as ^M:

:e ++ff=unix

Substitute CRLF for LF:

:1,$ s/\r\n/\r/g

No comments: