Wednesday, August 25, 2010

How to remove end of line using vim/gvim

I was just wondering how to remove all the end of line "\n" or "\n\r" characters and make the entire content into one line.  It is very simple. Go to command mode by pressing the escape key and press "shift + j".  Okay if you want this to be done by a search and replacing command then type :%s/\n//gc in command mode.

No comments:

Post a Comment