Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save deepchand11/2bbb763f6d57785fadf3fc23403fc44b to your computer and use it in GitHub Desktop.
Save deepchand11/2bbb763f6d57785fadf3fc23403fc44b to your computer and use it in GitHub Desktop.
VSCode italic font settings

VSCode italic font settings

Add this to settings.json (cmd ,):

{
  "workbench.iconTheme": "material-icon-theme",
  "window.zoomLevel": 0,
  "editor.formatOnSave": true,
  "workbench.colorTheme": "Shades of Purple",
  "files.autoSave": "onWindowChange",
  "editor.fontLigatures": true,
  "editor.fontFamily": "Victor Mono ,Operator Mono, Menlo, Monaco, 'Courier New', monospace",
  "editor.fontSize": 17,
  "editor.lineHeight": 25,
  "editor.letterSpacing": 0.5,
  "files.trimTrailingWhitespace": true,
  "editor.fontWeight": "400",
  "editor.cursorStyle": "line",
  "editor.cursorWidth": 5,
  "editor.cursorBlinking": "solid",
  "editor.renderWhitespace": "all",
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": [
          //following will be in italic (=FlottFlott)
          "comment",
          "entity.name.type.class", //class names
          "keyword", //import, export, return…
          "constant", //String, Number, Boolean…, this, super
          "storage.modifier", //static keyword
          "storage.type.class.js", //class keyword
        ],
        "settings": {
          "fontStyle": "italic",
        }
      },
      {
        "scope": [
          //following will be excluded from italics (VSCode has some defaults for italics)
          "invalid",
          "keyword.operator",
          "constant.numeric.css",
          "keyword.other.unit.px.css",
          "constant.numeric.decimal.js",
          "constant.numeric.json"
        ],
        "settings": {
          "fontStyle": ""
        }
      }
    ]
  }
}

Resources

https://www.cufonfonts.com/font/operator-mono https://github.com/kencrocken/FiraCodeiScript https://github.com/tonsky/FiraCode

"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true`

https://github.com/kosimst/FiraFlott

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