In Sublime Text 2, consider hyphen as part of word

后端 未结 3 1697
不思量自难忘°
不思量自难忘° 2021-02-01 04:00

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?

3条回答
  •  情歌与酒
    2021-02-01 04:42

    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.

提交回复
热议问题