Skip to content

Instantly share code, notes, and snippets.

@pauldan
Created April 30, 2021 07:07
Show Gist options
  • Star 41 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save pauldan/f3dbb3e33ee00acc36ad28c9e1de1bf9 to your computer and use it in GitHub Desktop.
Save pauldan/f3dbb3e33ee00acc36ad28c9e1de1bf9 to your computer and use it in GitHub Desktop.
remove italics vscode
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"comment",
"comment.block",
"comment.block.documentation",
"comment.line",
"constant",
"constant.character",
"constant.character.escape",
"constant.numeric",
"constant.numeric.integer",
"constant.numeric.float",
"constant.numeric.hex",
"constant.numeric.octal",
"constant.other",
"constant.regexp",
"constant.rgb-value",
"emphasis",
"entity",
"entity.name",
"entity.name.class",
"entity.name.function",
"entity.name.method",
"entity.name.section",
"entity.name.selector",
"entity.name.tag",
"entity.name.type",
"entity.other",
"entity.other.attribute-name",
"entity.other.inherited-class",
"invalid",
"invalid.deprecated",
"invalid.illegal",
"keyword",
"keyword.control",
"keyword.operator",
"keyword.operator.new",
"keyword.operator.assignment",
"keyword.operator.arithmetic",
"keyword.operator.logical",
"keyword.other",
"markup",
"markup.bold",
"markup.changed",
"markup.deleted",
"markup.heading",
"markup.inline.raw",
"markup.inserted",
"markup.italic",
"markup.list",
"markup.list.numbered",
"markup.list.unnumbered",
"markup.other",
"markup.quote",
"markup.raw",
"markup.underline",
"markup.underline.link",
"meta",
"meta.block",
"meta.cast",
"meta.class",
"meta.function",
"meta.function-call",
"meta.preprocessor",
"meta.return-type",
"meta.selector",
"meta.tag",
"meta.type.annotation",
"meta.type",
"punctuation.definition.string.begin",
"punctuation.definition.string.end",
"punctuation.separator",
"punctuation.separator.continuation",
"punctuation.terminator",
"storage",
"storage.modifier",
"storage.type",
"string",
"string.interpolated",
"string.other",
"string.quoted",
"string.quoted.double",
"string.quoted.other",
"string.quoted.single",
"string.quoted.triple",
"string.regexp",
"string.unquoted",
"strong",
"support",
"support.class",
"support.constant",
"support.function",
"support.other",
"support.type",
"support.type.property-name",
"support.variable",
"variable",
"variable.language",
"variable.name",
"variable.other",
"variable.other.readwrite",
"variable.parameter"
],
"settings": {
"fontStyle": ""
}
}
]
}
@fastmarketo
Copy link

fastmarketo commented Oct 25, 2022

I implemented the above still it completely didn't get me rid of the italics in the "Dark Theme".
image

Full code in settings.json:

{
    "workbench.colorTheme": "Dark Theme",
    "editor.fontFamily": "Fira Code, Menlo, Monaco, 'Courier New', monospace",
    "editor.fontLigatures": true,
    "terminal.integrated.fontSize": 20,
    "editor.fontSize": 20,
    "editor.tabSize": 2,
    "editor.tokenColorCustomizations": {   
        "textMateRules": [
          {
            "scope": [
              "comment",
              "comment.block",
              "comment.block.documentation",
              "comment.line",
              "constant",
              "constant.character",
              "constant.character.escape",
              "constant.numeric",
              "constant.numeric.integer",
              "constant.numeric.float",
              "constant.numeric.hex",
              "constant.numeric.octal",
              "constant.other",
              "constant.regexp",
              "constant.rgb-value",
              "emphasis",
              "entity",
              "entity.name",
              "entity.name.class",
              "entity.name.function",
              "entity.name.method",
              "entity.name.section",
              "entity.name.selector",
              "entity.name.tag",
              "entity.name.type",
              "entity.other",
              "entity.other.attribute-name",
              "entity.other.inherited-class",
              "invalid",
              "invalid.deprecated",
              "invalid.illegal",
              "keyword",
              "keyword.control",
              "keyword.operator",
              "keyword.operator.new",
              "keyword.operator.assignment",
              "keyword.operator.arithmetic",
              "keyword.operator.logical",
              "keyword.other",
              "markup",
              "markup.bold",
              "markup.changed",
              "markup.deleted",
              "markup.heading",
              "markup.inline.raw",
              "markup.inserted",
              "markup.italic",
              "markup.list",
              "markup.list.numbered",
              "markup.list.unnumbered",
              "markup.other",
              "markup.quote",
              "markup.raw",
              "markup.underline",
              "markup.underline.link",
              "meta",
              "meta.block",
              "meta.cast",
              "meta.class",
              "meta.function",
              "meta.function-call",
              "meta.preprocessor",
              "meta.return-type",
              "meta.selector",
              "meta.tag",
              "meta.type.annotation",
              "meta.type",
              "punctuation.definition.string.begin",
              "punctuation.definition.string.end",
              "punctuation.separator",
              "punctuation.separator.continuation",
              "punctuation.terminator",
              "storage",
              "storage.modifier",
              "storage.type",
              "string",
              "string.interpolated",
              "string.other",
              "string.quoted",
              "string.quoted.double",
              "string.quoted.other",
              "string.quoted.single",
              "string.quoted.triple",
              "string.regexp",
              "string.unquoted",
              "strong",
              "support",
              "support.class",
              "support.constant",
              "support.function",
              "support.other",
              "support.type",
              "support.type.property-name",
              "support.variable",
              "variable",
              "variable.language",
              "variable.name",
              "variable.other",
              "variable.other.readwrite",
              "variable.parameter"
            ],
            "settings": {
              "fontStyle": ""
            }
          }
        ]
      },
    "oneDarkPro.italic": false,
}


@pauldan
Copy link
Author

pauldan commented Oct 25, 2022

I think I used this with Wes Bos's Cobalt2 theme a long time ago and it was ok. I checked it now with my theme and its fine.

Check out this article https://www.hmablogs.com/change-color-of-text-and-syntax-in-vscode-editor/
and maybe add to the rules the elements still in italics.

@fastmarketo
Copy link

and maybe add to the rules the elements still in italics

Thanks for your reply, can you please provide example of how to accomplish the above?

@pauldan
Copy link
Author

pauldan commented Oct 25, 2022

It's explained in the article linked above.

@fastmarketo
Copy link

fastmarketo commented Oct 26, 2022

I saw that video. I am slightly confused as that video was targeting color customization. How can I change the below for font style, not color customization?

storage.type.js
"fontStyle": "italic" 

image

@fastmarketo
Copy link

fastmarketo commented Oct 26, 2022

Finally, I solved it by adding these files name as a rule:

image

Italic fonts are removed now. The theme looks awesome.

@usnea-longissima
Copy link

Perfect, thank you so much

@EmilGal
Copy link

EmilGal commented Jul 31, 2023

Thanks bro!

@Evangeliont
Copy link

Thanks you!

@donnieparka
Copy link

I saw that video. I am slightly confused as that video was targeting color customization. How can I change the below for font style, not color customization?

storage.type.js
"fontStyle": "italic" 

image

what extension is that i'd really love to get it

@pauldan
Copy link
Author

pauldan commented Apr 21, 2024

I didn't realize the article I linked is no more.
Its not an extension. Open the Command palette (Ctrl-Shift-p by default) and search for "Developer: Inspect Editor Tokens and Scopes".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment