Sublime Text and Hypens vs Underscores

荒凉一梦 提交于 2019-12-07 11:00:27

问题


I'm running into an issue with hyphens in sublime text 3 and I was looking for some help. I'd like them work the same way that underscores do.

With underscores, double clicking on word_one selects the whole thing while using the keyboard with ctrl-right hops to the underscore.

With hypens, double clicking on word-two selects the whole thing but using the keyboard with ctrl-right skips the entire word. If I add the hyphen to the "word separators" then the behavior is switched (double clicking now just selects the word you click but ctrl-right works properly).

Any help would be appreciated, thanks.


回答1:


Remove the hyphen from the list of characters that Sublime uses to define what a word is. This is stored in your preferences file. The default looks like this:

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

If you're feeling super-lazy, I've removed the hyphen for you here:

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

Of course, you should edit this in your User settings file. You can open that file by selecting the menu "Sublime Text->Preferences->Settings - User".



来源:https://stackoverflow.com/questions/20403806/sublime-text-and-hypens-vs-underscores

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!