Sublime Text 2 ctrl + d does not always select the next matching line

Possible duplicate:
How to select variables (not text) with the same name?

$project_id = $this->user_model->get_project_id(); $project_id = 'yo'; 

If I double-clicked the first instance of project_id , it will select it, and then by pressing ctrl + d we will select project_id inside get_project_id ctrl + d, we will select project_id in line 2.

Or, if I put the cursor on the first project_id and then press ctrl + d, it will select it for me. BUT, the second time I press ctrl + d, it will skip get_project_id and go to line 2.

I hope someone can do this. Is this a bug or a function? Why should I do this?

+4
source share
2 answers

I do not think this is a mistake.

If you select a row, CTRL + D will search for every occurrence of that row, even if it is part of another row.

If you place the cursor on a line, CTRL + D will search for the exact occurrences of that line.

I find this useful, even if it's a mistake. :)

+8
source

This behavior is a mistake . You can report this in the Sublime Text UserEcho forum .

+1
source

Source: https://habr.com/ru/post/1444402/


All Articles