Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您好我正在尝试使用 Putty 在文本文件中添加 Control M 字符。我尝试执行 Ctrl-v Ctrl-M,但一旦我这样做,它就会从腻子转到我的桌面主页。谁能告诉我如何在文件中添加 Ctrl M 字符
在vim插入模式中并键入CTRL- v CTRL- m。
vim
最简单的方法可能是使用该unix2dos实用程序:
unix2dos
$ unix2dos myfile.txt
在 Vim 中,在插入模式下,Ctrl-V x##,其中 ## 是字符的十六进制代码。在 Ctrl-M 的情况下,组合是 Ctrl-V x0d。如果你输入 :as 命令,你可以看到光标下一个字符的十六进制值。