Vim 中退格键的奇怪行为(从 Mac SSH 到 Linux)
我没有更改 Vim 的任何设置,但今天 Backspace 出现了一些疯狂的行为。每次我点击它时,它都不会删除一个字符,而是打印^?
。有人知道发生了什么事吗?
I didn't change any setting of my Vim, but today the Backspace gets some crazy behavior. Every time when I hit it, it does not delete a character, but prints ^?
. Anyone knows what is going on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不知道为什么它会根据您提供的信息随机开始执行此操作,但尝试将此行添加到您的
.vimrc
Not sure why it would randomly start doing this based on the information you gave, but trying adding this line to your
.vimrc
问题来自于 Mac 终端与 Linux 终端之间的通信。
转到 Mac 终端 ->首选项->高级选项卡中,选中“删除发送 Ctrl-H”选项。然后,当我登录 Linux 后,Backspace 在 Vim 中工作得很好。
The problem comes from the communication between Mac Terminal the Linux Terminal.
Go to the Mac Terminal -> Preferences -> Advanced tab, check the option "Delete sends Ctrl-H". Then after I login to Linux, and Backspace works just fine in Vim.
在 Mac Mavricks 和 Yosemite 中 打开终端,然后使用 command+,对于首选项,单击配置文件选项卡,单击 -键盘- 菜单,然后添加 +
单击确定
In Mac Mavricks and Yosemite Open a terminal, then command+, for preferences, click on the profile tab, click on the -keyboard- menu, then add +
click Ok