更改 PHP 标记语法突出显示
Change PHP Tag Syntax Highlighting
我正在使用 WordPress,它在 .php
文件中混合了 PHP 和 HTML。现在 open/closing PHP 和 HTML 标签是相同的蓝色(在深色主题上)。我想知道是否有办法更改 opening/closing PHP 标签的颜色以更好地区分 PHP 和 HTML 部分?这是演示我的意思的屏幕截图。
安装 material-theme
作为扩展。根据需要更改 color theme
和 set accent color
。您将在 preference
上找到这些设置。在 Linux 上按 ctrl+shift+p
并在安装 Material 主题或您喜欢的任何其他主题后搜索颜色主题。
将其添加到您的 settings.json(它将颜色设置为 #d65656)
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"punctuation.section.embedded.begin.php",
"punctuation.section.embedded.end.php",
],
"settings": {
"foreground": "#d65656"
},
}
]
}
我正在使用 WordPress,它在 .php
文件中混合了 PHP 和 HTML。现在 open/closing PHP 和 HTML 标签是相同的蓝色(在深色主题上)。我想知道是否有办法更改 opening/closing PHP 标签的颜色以更好地区分 PHP 和 HTML 部分?这是演示我的意思的屏幕截图。
安装 material-theme
作为扩展。根据需要更改 color theme
和 set accent color
。您将在 preference
上找到这些设置。在 Linux 上按 ctrl+shift+p
并在安装 Material 主题或您喜欢的任何其他主题后搜索颜色主题。
将其添加到您的 settings.json(它将颜色设置为 #d65656)
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"punctuation.section.embedded.begin.php",
"punctuation.section.embedded.end.php",
],
"settings": {
"foreground": "#d65656"
},
}
]
}