如何在Sublime Text 3中的选定文本实例之间导航? [英] How to navigate between instances of selected text in Sublime Text 3?
问题描述
崇高文字3突出显示当前所选文字的所有实例.是否有任何快捷方式可将光标导航到所选文本的下一个/上一个实例(副本)?
Sublime Text 3 highlights all instances of currently selected text. Is there any shortcut to navigate cursor to the next / previous instance (copy) of selected text?
到目前为止,我仅设法找到有关添加更多实例的一些信息使用 Ctrl + D 到当前选择(扩展),跳过当前实例( Ctrl + K , Ctrl + D )并取消选择它( Ctrl + U ),这实际上是一个软撤消,不是真正的命令
So far, I've only managed to find out some information about adding more instances to current selection (expanding it) with Ctrl+D, skipping current instance (Ctrl+K, Ctrl+D) and deselecting it (Ctrl+U), which actually is a soft undo, not a real command.
我可以使用 Ctrl + D 转到所选文本的下一个实例,并使用 Ctrl + U 撤消.但是,由于这些快捷方式可以根据选择进行操作,因此,这并不是我想要的.
I can use Ctrl+D to go to next instance of selected text and Ctrl+U to undo. But, since these shortcuts operates on selection, this is not, what I'm looking for.
实际上,我想问的是,有什么方法可以像按 Alt + Right 转到下一个实例或 Alt + 左转到上一个.
Actually, I'm asking, is there any way to have this as simple as pressing Alt+Right to go to the next instance or Alt+Left to go to previous.
如果默认情况下未解决此问题,那么应将哪些命令与用户定义的键盘快捷键联系起来?
If this is not solved by default, then what commands should be tied to user-defined keyboard shortcuts?
推荐答案
是,您所需要做的就是编辑按键绑定(崇高文本->首选项- >键绑定用户)"find_under" .复制和将此粘贴到您的绑定中并设置您的键(默认值为"alt + super + g"和shift + alt + super + g)
Yes, all you need to do is edit your key bindings (Sublime Text -> Preferences -> Key Bindings User) for "find_under". Copy & paste this into your bindings and set your keys (defaults are "alt+super+g" and shift+alt+super+g)
{ "keys": ["alt+super+g"], "command": "find_under" },
{ "keys": ["shift+alt+super+g"], "command": "find_under_prev" },
这篇关于如何在Sublime Text 3中的选定文本实例之间导航?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!