您的位置:首页 > 其它

How to replace a character for a newline in Vim?

2015-02-11 18:41 471 查看
down
votefav
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?

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

Use
\r
instead
of
\n
.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: