(Enter the the ^M by hitting ctrl-v and then the return key.)
:1,$s/^M/\r/g
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
You need to create an account or log in to post comments to this site.
» pdftotext in shell osx mac bash unix pdf text convert
» Terminal window commands in shell osx mac bash unix osascript text window terminal color title bar escape sequence background
» Terminal window commands in shell osx mac bash unix code osascript text window terminal color title bar escape background ansi
» Delete carriage returns & ne... in shell osx mac bash vi unix vim file sed ed tr newline cr nl carriage return in_place
» get rid of mac's ._ meta fil... in shell mac unix linux
» opening in a textmate projec... in grep regex shell osx mac unix textmate
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails
%is shorthand for 1,$, and as odd as it looks you can use\rfor both sides of the substitution and it works. This way, you don't have to remember Control-V.