Sublime Forum

Take advantage of Sublime's "auto selecting/circling"?

#1

When you highlight something in Sublime, it will circle all the other instances of the highlighted item in the document. I’m just wondering if there is anyway to use this, or is it just for reference. Is there perhaps a hotkey that can be pressed that will change/update all the circled items with any changes made to the highlighted text?

Thank you for any input anyone has.
Nick

0 Likes

#2

CtrlD will select the next highlighted term (fixed via @FichteFoll)
AltF3 all of them

then you can use arrow keys, and modify each term

2 Likes

#3

Ctrl + D on Windows/Linux.

3 Likes

#4

Perfect, thank you both, that’s exactly what I was looking for. :slightly_smiling:

0 Likes

#5

So Alt + F3 has been working great, but a today, a scenario happened that perfectly explains what I was really asking.

I went to select the “p” in a paragraph tag, and Sublime circled other p’s in the document, but only ones inside tags, similar(the same) to the original. However when I pressed Alt + F3 it then selected ALL the “p’s” in the document. The P in DOCTY PE, PUBLIC, htt P, etc.

So again, is there anyway to use this “smart” selection?

Thank you again for any input.
Nick

0 Likes

#6

 
You’ll have to add some extra context to the region you want to select, and then remove the contextual characters from the selection.
 



Example:

 



###Notes:

SublimeText’s native highlight matches feature is somewhat limited.  I think it only works with whole words, but am not sure of it’s exact limitations.

WordHighlight allows highlighting of arbitrary characters, as shown in the example.
( it also accurately depicts which regions will be selected by Alt + F3, as shown briefly when p is the only character selected )

Also, SelectionTools has a reverse_selection_direction command which is very useful for contextual matching & other purposes.

0 Likes

#7

Either:
Don’t select the “p”, but the cursor right before it and hit Alt+F3 (or Ctrl+D).
Or:
Select it, hit Ctrl+F, hit Alt+W (for Whole word) and hit Alt+Enter.

First solution is easier :wink:

Ctrl+F3 and Ctrl+D have special behavior depending if there’s a selection or not.

3 Likes

#8

Wordhighlight does exactly what I was looking for. Had to add the custom key binding.

0 Likes