在vim中插入回车符 [英] Insert the carriage return character in vim

查看:107
本文介绍了在vim中插入回车符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编辑存储在 Unix 中的文件的网络协议框架(\n 换行符).我需要插入回车符(U+000D aka \r).当我尝试从剪贴板粘贴它 ("+p) 或使用 Ctrl+Shift+u-000d,插入换行符(U+000A).

I'm editing a network protocol frame stored a file in Unix (\n newlines). I need to insert the carriage return character (U+000D aka \r). When I try to paste it from the clipboard ("+p) or type it using Ctrl+Shift+u-000d, the linefeed is inserted (U+000A).

正确的做法是什么?

推荐答案

类型:ctrl-v ctrl-m

在 Windows 上使用:ctrl-q ctrl-m

On Windows Use: ctrl-q ctrl-m

Ctrl-V 告诉 vi 输入的下一个字符应该按字面插入,而 ctrl-m 是回车键.

Ctrl-V tells vi that the next character typed should be inserted literally and ctrl-m is the keystroke for a carriage return.

这篇关于在vim中插入回车符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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