用 Enter 替换回车 ^M [英] Replacing carriage return ^M with Enter

查看:34
本文介绍了用 Enter 替换回车 ^M的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何删除文件中的 ^M (%s/^M//g),但这只是我想要的一行将 ^M 替换为 enter... VIM 中的输入字符是什么(在命令行模式下使用).

I know how to remove ^M in my files (%s/^M//g), but this one is just one line I'd like to replace ^M with enter... what's the enter character in VIM (to use in commnad-line mode).

推荐答案

您可以在普通模式下使用 r<CR> 替换一个字符.
或者,您可以通过键入 <C-v><CR> 在命令行模式下输入返回".

You can replace one character using r<CR> in normal mode.
Or you can enter a "return" in command line mode by typing <C-v><CR>.

这篇关于用 Enter 替换回车 ^M的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆