Thursday, August 27, 2009

Adding a newline in gvim

I used to do :s/pattern/CTRL-V-M/g
[CTRL-V-M == press control key, then hit v then m]

This doesnt work sometimes. instead there is a much cleaner way

:s/pattern/\r/g

Interesting that simple things we miss lot of times