vim 使箭头键像大多数普通程序一样工作
我最近发现了 VIM 并开始使用它。我发现箭头和退格键有缺陷。 所以我对退格键执行了此操作,
set backspace+=indent,eol,start
如何对箭头键执行此操作以允许正常导航?
I recently found VIM and started using it. I found the arrows and backspace to be flawed.
so I did this to the backspace
set backspace+=indent,eol,start
how can this be done to the arrow key to allow normal navigation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有确切地说您认为箭头键的哪一方面是“有缺陷的”,所以我只能猜测。
您可以使用
whichwrap
设置来获取您可能想要的部分内容。来自:help whichwrap
:在您的情况下,您可能想要:
这将使左右环绕行结尾。
您还可以尝试在正常和视觉状态下将
和
映射到gk
和gj
如果逻辑线和显示线之间的区别让您感到困惑。或者,您可以:set nowrap
完全消除区别。You don't say exactly what aspect of the arrow keys you think is "flawed", so I'll just have to guess.
You can use the
whichwrap
setting to get part of what you probably want. From:help whichwrap
:In your case, you probably want:
This will make left and right wrap around line endings.
You can also try mapping
<Up>
and<Down>
togk
andgj
in normal and visual modes if the distinction between logical and display lines is confusing you. Alternatively, you could:set nowrap
to remove the distinction altogether.