Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 2 ctrl+d doesn't always select the next matching string [duplicate]

Tags:

sublimetext2

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 click the first instance of project_id, it'll highlight it, then pressing ctrl+d will select project_id inside of get_project_id ctrl+d again will select project_id on line 2.

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

I hope someone could follow that. Is this a bug, or a feature? Why would I want it to do this?

like image 703
Farzher Avatar asked Jan 15 '23 02:01

Farzher


2 Answers

I don't think it's a bug.

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

If you put your cursor on a string, CTRL+D will look for the exact occurrences of that string.

I find this useful, even if it was a bug. :)

like image 116
Riccardo Marotti Avatar answered Apr 06 '23 00:04

Riccardo Marotti


This behavior is a bug. You can report it at Sublime Text's UserEcho forum.

like image 25
Sara Avatar answered Apr 05 '23 23:04

Sara