Sublime Forum

Select all instances of a word within selection

#1

Hey everyone!

Having selected an area, it would be great to be able to select all instances of a word - only within that selection - when doing cmd + left click on it.

Best wishes,
Shu

0 Likes

#2

Have a look at the In Selection flag of the Find panel.

0 Likes

#3

Thanks for the reply! That seems to be exactly what I’m looking for. Unfortunately, either

  • I don’t really know how to use it or
  • it’s not working on my machine (macOS).
0 Likes

#4

It does work, but you have to type search & replace text first, then select the only within selection toggle, which I find counter intuitive, since typing find text will temporarily disable the selection visibility. Otherwise, it can cause trouble. Not sure if bug or intended. Also, the toggle doesn’t stick, so you always have to enable it again.

0 Likes

#5

You can keep the toggle on using the auto_find_in_selection setting.

0 Likes

#6

I did try that setting after reading it somewhere and it does help a lot!

0 Likes