1

I'm using Windows 8 x64, Sublime Text 3.

Here it is, I want to select all the variable with the same name in the file.

If I choose one of them, the one will be highlighted, all the others will be circled automatically, it's seems like Sublime text could recognize who is the word may be I want, even if they have the same word.

for example, if I choose num, ST will circle the word num but skip the word like num2 etc.

but neither I using ctrl+d or alt+f3, I couldn't just choose these variables safety - if there was other same word but not variable name in the code file. I just can't skip it. the num in num2 will also be highlighted.

Is there any way to choose the variables clean and safety like it been circled? or better, just choose the variables?

piratf
  • 107
  • 12
  • 2
    you should keep in the mind - Sublime Text is an Editor, not IDE. You could achive what you want using [plugins](https://packagecontrol.io/) but quality of that plugins could be different :) – Reishin May 06 '15 at 05:46

1 Answers1

1

After asking myself the same question and searching lots and lots, I found the answer here on the official forum and here on SO (discarding results for ST2 wasn't that good of an idea after all ...)

  1. Place your cursor on the word, without selecting it.
  2. Press ALT + F3.

Or ...

  1. Select the word,
  2. In the Find menu, select Find... (CTRL + F),
  3. Tick the Whole word option (Alt + W),
  4. Press the Find All button (Alt + Enter).
Community
  • 1
  • 1
Chnossos
  • 9,971
  • 4
  • 28
  • 40
  • Thank you very much! It's seems not to find variables but the word in special format. When I'm searching simple variable name like 'n', the 'n' in statement “printf("%d\n", var);" was been highlighted too. Anyway, It's much better than ctrl-d : ) – piratf Sep 24 '15 at 12:18