Insert the carriage return character in vim

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 09:31:11

问题


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).

What is the right way to do it?


回答1:


Type: ctrl-v ctrl-m

On Windows Use: ctrl-q 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.



来源:https://stackoverflow.com/questions/1585449/insert-the-carriage-return-character-in-vim

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!