Reputation: 17495
When you press Ctrl+F, enter some search query and click on Find All
(or hit Alt+Enter), Sublime Text 3 will find and select all occurrences of searched term found in current document. It will even count then, writing X selection regions
in status bar.
I'd like to add a functionality, where pressing Alt+Left Arrow moves cursor to previous selected region, while pressing Alt+Right Arrow moves it to the next selected region.
I know how to modify Sublime Text 3's key bindings and add own keyboard shortcut, but I have no experience with selection regions in ST3 API, so I don't even know, where to start.
Can someone help here?
Upvotes: 0
Views: 51
Reputation: 54379
You can add your own shortcuts:
Open menu Preferences > Key Bindings - User
Add these lines:
{ "keys": ["alt+right"], "command": "find_next" },
{ "keys": ["alt+left"], "command": "find_prev" }
That's it, now you can use Alt+Left Arrow to move cursor to previous selected region and Alt+Right Arrow to move it to the next selected region
Upvotes: 1