How can I have a double-click on a word which contains a hyphen (dash) in Sublime Text 2 select the entire word, not just one part of the word delimited by the hyphen?
Click settings -> default settings, locate the "word_separators"
key and delete the hyphen from the character set, re-save.
As @Nate Pinchot stated, it's better to add the "word_separators"
key to the User Settings. In case of updating Sublime Text the changes in Default Settings
will be reset.
Go to Preferences > Settings ̶ Users
and add between the outermost {}
brackets:
// Characters that are considered to separate words, here without hyphen
"word_separators": "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`~?",
Don't forget about the comma at the end if it's not the only or last key added.
As @Intentss mentioned (i don't want it lost in the comments), if you only want to modify this behaviour for a specific file type:
Preferences > Settings - More > Syntax Specific - User.
or in my case
Preferences > Settings - Syntax Specific
and then edit the user version that shows up:
"word_separators": "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`~?"