(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
» Search & replace with find & ed in find grep shell osx mac search bash unix text file replace ed binary
» Using this function you will... in apache php mysql find ruby rails time date perl regex shell http osx mac css python google html bash error windows sql activerecord javascript java rubyonrails unix linux database c text csharp XSLT image string xml file array web url math mongrel_cluster hash convert dscl C++ sips series60 rexml REBOL jonas jsfromhell raoni sinatra rscript
» Statement Emulation in apache php mysql find ruby rails time date perl regex shell http osx mac css python google html bash error windows sql activerecord javascript java rubyonrails unix linux database c text csharp XSLT image string xml file array web url math mongrel_cluster hash convert dscl C++ sips series60 rexml REBOL jonas jsfromhell raoni sinatra rscript
» Fill data into an XML templa... in apache php mysql find ruby rails time date perl regex shell http osx mac css python google html bash error windows sql activerecord javascript java rubyonrails unix linux database c text csharp XSLT image string xml file array web url math mongrel_cluster hash convert dscl C++ sips series60 rexml REBOL jonas jsfromhell raoni sinatra rscript
» Wrap all methods (functions)... in apache php mysql find ruby rails time date perl regex shell http osx mac css python google html bash error windows sql activerecord javascript java rubyonrails unix linux database c text csharp XSLT image string xml file array web url math mongrel_cluster hash convert dscl C++ sips series60 rexml REBOL jonas jsfromhell raoni sinatra rscript
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.