Visual Studio Code—Customizing word separators

情到浓时终转凉″ 提交于 2019-12-10 12:42:15

问题


Is there a way to customize (i.e., in settings.json) the set of characters used to delimit words and tokens in Visual Studio Code? I'm referring to the set of characters used to control the behavior of actions like Alt+Left, Alt+Right, or double-clicks when navigating text.

Sublime Text supports a "word_separators" option for settings files that take a set of characters like “./\()"’-:,.;<>~!@#$%^&*|+=[]{}~?”. Does Code support a similar feature?


回答1:


As of the February update, v0.10.10 (February 2016), word navigation and word separators has now been added! As of today you can view the update announcement here under "Word navigation and word separators", but after the next release the url will probably change to this... I make this assumption based on previous releases.

Your settings file(s) now contain a section for editing word navigation and word separators

// Characters that will be used as word separators when doing word related navigations or operations
"editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",


来源:https://stackoverflow.com/questions/31632351/visual-studio-code-customizing-word-separators

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