Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selecting text including $ in Sublime Text 3

I'm a former Netbeans user, who finally came out of the darkness toward light and started using Sublime Text 3.

I personally adore this editor, but there is one, quite tiny, yet annoying, thing. When double clicking any piece of text, ST3 selects entire word. If this is variable name (that is -- $ stands in the beginning), it does nothing special, it still selects word only. Netbeans (and probably many other IDEs) does select word + $ in this case.

Is there any way (macro, snippet, key binding), that I could achieve the same in Sublime Text 3?

like image 674
trejder Avatar asked Jan 10 '23 19:01

trejder


1 Answers

When double clicking any piece of text, Sublime Text selects words. The $ character its considered to be a word separator.

Fortunately, you can change this behavior by modifying the word_separators stting in the Sublime preferences. So, remove the $ character from the word_separators setting and save the new setting to your user settings (Preferences > 'Settings - User'). This is the original setting (located in Preferences > 'Settings - Default') with the $ character already removed:

"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
like image 101
sergioFC Avatar answered Jan 14 '23 12:01

sergioFC