How to customise the textMateRules for multiple themes in VS Code? [duplicate]
·
Answer a question
In VS Code, I'd like to customise some textMateRules the same for multiple themes. For example, both for Atom One Dark and Default Dark+ but without affecting any of the other themes, I'd like to make the keywords italic. I can achieve this by duplicating the same settings twice separately for each theme as below
"editor.tokenColorCustomizations": {
"[Atom One Dark]": {
"textMateRules": [
{
"scope": [ "keyword" ],
"settings": { "fontStyle": "italic" }
}
]
},
"[Default Dark+]": {
"textMateRules": [
{
"scope": [ "keyword" ],
"settings": { "fontStyle": "italic" }
}
]
}
}
How can I only need to set up once for both, without duplicating the rules, especially if there are a lot same rules for the multiple themes? Something like the below (but which doesn't work though)
"editor.tokenColorCustomizations": {
"[Atom One Dark] [Default Dark+]": {
"textMateRules": [
{
"scope": [ "keyword" ],
"settings": { "fontStyle": "italic" }
}
]
}
}
Answers
Microsoft will add this feature if microsoft/vscode#103694 gets upvoted enough. The behaviour you want is not possible unless you customise every theme.
{
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [ "keyword" ],
"settings": { "fontStyle": "italic" }
}
]
}
}
更多推荐
所有评论(0)