Sublime Forum

ST2: Keyboard shortcut to toggle "find in selection"

#1

Sometimes I have text selected and then want to search for something outside of the selection. The only way I know how to do that currently is to click somewhere in the document to deselect and then re-run the find, but this is awkward. Is there a way to toggle the “find in selection” setting with a keyboard shortcut? I searched the forum and checked the default bindings but didn’t find the answer.

Alternatively, is there a way to deselect all in the document while the find panel is open and focused?

0 Likes

#2

You could upgrade to ST3:

// When auto_find_in_selection is enabled, the "Find in Selection" flag // will be enabled automatically when multiple lines of text are selected "auto_find_in_selection": false,

Or you could make a tiny plugin that just deselects text and then opens the find panel… Or you could try to inspect the settings of the find panel view and try to figure out if there’s actually a way to toggle “in selection” from code.

0 Likes