Quantcast
Channel: How to replace a character by a newline in Vim - Stack Overflow
Viewing all articles
Browse latest Browse all 13

How to replace a character by a newline in Vim

$
0
0

I'm trying to replace each , in the current file by a new line:

:%s/,/\n/g 

But it inserts what looks like a ^@ instead of an actual newline. The file is not in DOS mode or anything.

What should I do?

If you are curious, like me, check the question Why is \r a newline for Vim? as well.


Viewing all articles
Browse latest Browse all 13

Latest Images

Trending Articles





Latest Images