Sublime Forum

Make Expand Selection to Word (CMD+D) behave like highlight?

#1

Given the following code example:

for (var i = 0; i < list.length; i++) {
  // a comment with the letter i in it many times
  my_special_function(i);
}

When selecting i, it will highlight all the proper occurrences of the instances of the variable i. However, when pressing CMD+D, it selects all instances of the letter i. So, if I am trying to rename the variable i, it would select i in special and i in function when using CMD+D. Yes, I can skip with CMD+K, CMD+D, but in my real-world instances, this is sometimes a real pain skipping long comments, etc.

Is there any way to make CMD+D behave as the highlighting does?

0 Likes