您的位置:首页 > 其它

What does ^M character mean in Vim?

2015-02-11 16:26 375 查看
Unix uses 0xA for a newline character. Windows uses a combination of two characters: 0xD 0xA. 0xD is the carriage return character.
^M
happens
to be the way vim displays 0xD.

You can remove all the
^M
characters
by entering the following:
:%s/^V^M//g


where
^V^M
means CTRL+V,CTRL+M and
is a way to entering characters
^M
into
vi. It will globally replace all occurrences of
^M
with
nothing.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: