Sublime Forum

Edit highlighted words [macOS]

#1

I’m trying to rename a variable in a Python file. I double click the first occurrence, it gets selected, the remaining occurrences are highlighted with an outline.

Now I would like to type the new name. What’s the keyboard shortcut? I’m struggling to find it in the documentation or in the menus. Basically I want to put multicursors to all the highlighted spots, so my edit will apply to all of them…

0 Likes

#2

Find > Quick Add Next or Find > Quick Add All are what you’re looking for.

0 Likes

#3

I don’t see the “Quick Add All” item in my Find menu. CMD-SHIFT-P search box doesn’t find any command with this name.

I do have “Quick Find All” (ctrl-cmd-G) but that one behaves differently - it selects other undesired occurrences of the string (in the example above, it selects the word in the printed string.)

0 Likes

#4

Yes, sorry I meant Quick Find All. Quick Add Next adds only the next one to the selection, which is what you’re looking for.

0 Likes