vi 随机回显按键
使用 vi 时,有时会将按键回显到屏幕上。例如,如果我按 escape,屏幕上会显示 ^[。实际的字符不会写入文件,因为如果我转到文件中的另一个位置并返回,字符就不在那里。尽管如此,当这种情况发生时,还是会让人感到困惑,尤其是当字符出现在有文本的地方时。
我还安装了gvim。它永远不会在那里发生,但它会发生在终端中运行的所有各种类型的 vi 中。
为什么会发生这种情况?如何解决?
When using vi it sometimes echoes keypresses to the screen. For example, if I press escape, it will show ^[ on the screen. The actual characters don't get written to the file, because if I go to another place in the file and come back, the characters aren't there. Still, it's confusing when this happens, especially if the characters appear where there's text.
I also have gvim installed. It never happens there, but it happens in all the various types of vi that run in a terminal.
Why does this happen, and how can it be fixed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您的连接速度较慢时,这没关系。
当我通过慢速连接在远程计算机上使用 vim/vi 时,这也发生在我身上。这是因为慢速连接延长了 vim 响应你的击键的内部速度。对我来说,没有什么害处,但它很慢,并且会给眼睛带来异常。至少VI是在这种情况下设计的,它可以很好地处理慢速连接。
It's okay when you are working on slow connection.
It also happened to me, when I used vim/vi on remote machine over slow connection. It's because the slow connection extends the internal speed vim responds to your keystrokes. For me, nothing harmful but it's slow, and gives exception to eyes. At least VI is designed in this kind of condition, it can handle slow connection very well.
这并不能真正帮助您解决问题,但如果只是终端中的噪音,您可以使用
:redr[aw]!
命令来清理屏幕。This doesn't really help you fix the problem, but if it's just noise in the terminal, you could use the
:redr[aw]!
command to clean up your screen.