英文:
In (neo)vim, how can I jump to the start or end of a text object?
问题
我熟悉如何在各种文本对象内部或周围进行更改、删除、复制等操作。我想要跳转到当前句子的开头或结尾,或者我当前所在的任何其他文本对象。有没有相应的命令可以实现这个功能?
英文:
I am familiar with how I can change, delete, yank etc inside or around various text objects.
I would like to jump to the start or end of the current sentence, or any other text object I currently in.
Is there some command to do this?
答案1
得分: 1
没有通用的命令来完成这个操作。
也就是说,使用v<text-object><Esc>
会将光标留在文本对象的末尾,而使用v<text-object>o<Esc>
会将光标留在开头。vip<Esc>
或vipo<Esc>
也不错。
请参考:help v_o
。
如果你感到有冒险精神,可以考虑使用这个基本技巧来构建自己的自定义动作。
英文:
There is no generic command for that.
That said, doing v<text-object><Esc>
leaves the cursor at the end of the text object, and doing v<text-object>o<Esc>
leaves the cursor at the start. vip<Esc>
or vipo<Esc>
are not so bad.
See :help v_o
.
If you feel adventurous, you may consider using that base technique to build your own custom motions.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论