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?
I'm on a mac, and this has sort of already been mentioned, but it doesn't require altering the hotkey menu and works well enough for me.
cmd+K keeps your highlight but deselects it
cmd+D expands your selection (now empty thanks to cmd+k) by including the next occurrence
highlight a string (one that recurs)
while holding cmd -> press K, then press D
alternating back and forth as many times as necessary.
Each time D is alternated to, your highlight and selection jump to only the next occurrence.
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" },
I also needed to navigate through occurrences of a word in a quicker way than:
And I just found this tip:
I hope this also helps you.
I may be misunderstanding your question but what you are asking seems pretty simple and I wonder if that means you might mean something else. Anyway here's an answer that I hope is what you are looking for.
First, ensure that you have the following set to true in your preferences:
// If true, the selected text will be copied into the find panel when it's
// shown.
// On OS X, this value is overridden in the platform specific settings, so
// you'll need to place this line in your user settings to override it.
"find_selected_text": true,
Select the string you are interested in.
Search in current file [OS X Cmd+F :: Windows Ctrl+F]
Now you can step through the matches:
Some more here :: http://www.cheatography.com/njovin/cheat-sheets/sublime-text-2-keyboard-shortcuts-windows/
What am I missing in your question?