在 Vim/Vi 中,如何将光标移动到上一个单词的末尾?
在 Vim 的正常模式下:
- e 转到下一个单词的末尾
- w 转到下一个单词的开头
- b 转到下一个单词的开头前一个单词
如何将光标移动到前一个单词的末尾?
In Vim's normal mode:
- e goes to the end of the next word
- w goes to the beginning of the next word
- b goes to the beginning of the previous word
How do you move the cursor to the end of the previous word?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不幸的是,它不是一个键...但我认为 ge 就是您正在寻找的。
Unfortunately it's not a single key... but ge is what you're looking for, I think.
尝试ge:
Try ge:
如 VIM 手册(第 03.1 节)所示,您可以使用 ge 转到上一个单词的末尾
as seen on VIM manual (section 03.1), you can use ge to go to the end of previous word
您可能还想执行这些操作以转到单词前面的空格(ge 之后的一个字符:(两者都只有 2 个键)
但例外情况是 。在行的开头,在这种情况下
You may also want to do these to go to the space preceding a word (one character after ge: (both are only 2 keys)
The exception is when you are at the beginning of a line, in which case