Sublime Forum

How to select all same-name variables?

#1

Under Windows/Linux, “alt+f3” is the shortcut to select all same texts.
But if we want to select same-name variables, it’s will not a suitable way under some circumstances.

For example, we want to select all variable ‘a’.

“alt+f3” gives all text ‘a’, which is not what we want.

Is there a way to select all variable a’s?

0 Likes

#2

That’s Quick Find All, right? (I’m on a Mac, so the shortcut is different) In that case, don’t select the variable you want, just put the cursor in or near it and SublimeText will search for full words only. The search will likely still be case insensitive though, so some false matches may still be there. Quick Find All actually follows the case sensitivity setting in the Find panel, so if it is turned on there, Quick Find All will also be case sensitive. Incidentally, Quick Add Next (Ctrl/Cmd+D) works in the same way with regard to selections and case sensitivity.

0 Likes