Sublime Forum

Quick Add Next... but contextual?

#1

Visuals always help to better understand. I’m on OS X, and of course, to Quick Add Next I command+D so I can quickly select multiple of the same string i’ve highlighted. But, to backtrack, when you highlight a variable for example:

that’s good. I wanted all each of those variables highlighted so i can Quick Add Next them all to alter the name, but when I do Quick Add Next… it also gets the out-of-context string matches:

Perhaps there’s something already existent that let’s me achieve the desired result of command+d’ing on strings within the context of what I’m initially selecting.

Thanks,
M

0 Likes

#2

Not sure what do you mean by “context”…
Do you mean searching whole word or not ?

ctrl+d have a different behavior depending of the selection:
-If you have no selection when you kick it (zero length selection), it search using whole word.
-If you have a selection when you kick it (one or more char. selection), it search all occurrence of the selection.

I like this behavior a lot.
I suppose the solution of your issue is simply to remove the selection (with left/right arrow) before you hit ctrl+d.
Maybe there’s a argument to change this behavior (don’t think so), or you can write a plugin to change the selection before calling “Quick Add Next” (twice I suppose).

0 Likes