bell2041
bell2041

Reputation: 171

Sublime select a word shorcut with all signs

There is a shortcut Ctrl + D Select word - Repeat select others occurrences

but in the case of

'11.20' or 'SELECT#ME'

the shortcut will only select ether first "SELECT" or the second part "ME"

Is there a way to create a shortcut to select a whole word and only break it by ether single or double quotes or a space so in my example it will select '11.20' and 'SELECT#ME'

Thank you

Upvotes: 1

Views: 35

Answers (1)

MattDMo
MattDMo

Reputation: 102902

You can set which characters are considered word separators by editing the word_separators setting in your User Preferences. The default value is:

"word_separators": "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?"

Add the entire thing to your preferences (Preferences -> Settings-User on Windows/Linux or Sublime Text -> Preferences -> Settings-User on OS X), remove the characters you want to be included as part of words (# and ., in your case), save the file, and you should be all set. Please note that the \ characters in front of the \ and " items are escaping them, so if you want to remove \, for example, you'll need to remove both back slashes.

Upvotes: 1

Related Questions