如何在PHP的Visual Studio代码中选择包括$在内的整个变量名称?
2022-08-30 11:36:46
最好的方法是编辑 VsCode settings.json 并为 PHP 语言指定它。您可以打开它,键入 VsCode 命令:
首选项:打开设置 (JSON)
并在您的语言的“editor.wordSeparators”设置中指定删除“$”符号:
"[php]": {
"editor.wordSeparators": "`~!@#%^&*()-=+[{]}\\|;:'\",.<>/?"
}
您需要从 editor.wordSeparators
指令中删除该符号。这是默认值:$
// Characters that will be used as word separators when doing word related navigations or operations.
"editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",
如果需要,您可以使此语言成为特定语言,因此它仅适用于PHP。