Vim 中退格键的奇怪行为(从 Mac SSH 到 Linux)

发布于 2024-12-26 13:30:27 字数 110 浏览 3 评论 0原文

我没有更改 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

秉烛思 2025-01-02 13:30:27

不知道为什么它会根据您提供的信息随机开始执行此操作,但尝试将此行添加到您的 .vimrc

set backspace=start,eol,indent

Not sure why it would randomly start doing this based on the information you gave, but trying adding this line to your .vimrc

set backspace=start,eol,indent
痴情换悲伤 2025-01-02 13:30:27

问题来自于 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.

荭秂 2025-01-02 13:30:27

在 Mac Mavricks 和 Yosemite 中 打开终端,然后使用 command+,对于首选项,单击配置文件选项卡,单击 -键盘- 菜单,然后添加 +

Key: very bottom, <= Delete
Modifier: ^ Control
Action: Send Text
Text: H

单击确定

In Mac Mavricks and Yosemite Open a terminal, then command+, for preferences, click on the profile tab, click on the -keyboard- menu, then add +

Key: very bottom, <= Delete
Modifier: ^ Control
Action: Send Text
Text: H

click Ok

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文