Monday, August 10, 2009

Inserting a newline when replacing text in Vim

Using \n to insert a newline when replacing text in Vim doesn't work, instead you need to use \r. This will not work as expected: :s/foo/\n/g But this will: :s/foo/\r/g

No comments:

Post a Comment