How can I make my vscode fonts slanted like sublime?


Qiwei Wang

I'm using the same font (Consolas) in VScode and sublime . But it doesn't look the same in the same place:enter image description here

enter image description here

Here is my sublime setup:

{
    "auto_complete_selector": "source,text",
    "color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
    "font_face": "Consolas",
    "font_size": 12,
    "ignored_packages":
    [
    ],
    "theme": "Default.sublime-theme"
}

Here is my vscode setup:

    "materialTheme.accent": "Blue",
    "editor.fontFamily": "Consolas, 'Courier New', monospace",
    "editor.fontWeight": 520,
    "editor.codeLensFontSize": 11,
    "editor.fontSize": 15,
    "editor.formatOnType": true,
    "debug.console.fontFamily": "Cascadia Mono",
    "python.showStartPage": false,
    "workbench.editorAssociations": [
        {
            "viewType": "jupyter.notebook.ipynb",
            "filenamePattern": "*.ipynb"
        }
    ],
    "explorer.confirmDelete": false,
    "todo-tree.tree.showScanModeButton": true,
    "editor.fontLigatures": true,
    "editor.tokenColorCustomizations": {
       "comments": "#7ea9eb"
    

My question is: how can I make my vscode font slanted like sublime?

Anson

According to the VS Code documentation , you can customize theme colors using rules in editor.tokenColorCustomizationsuser settings :

  1. First open yours settings.jsonand add the following rules (replace with YOUR THEME NAME HEREthe name of your color theme):

    "editor.tokenColorCustomizations": {
       "[YOUR THEME NAME HERE]": {
          "textMateRules": []
       }
    }
    
  2. Open the Python file of your choice. Then, open Command Palette Ctrl++ Shiftand Prun "Development: Check Edit Tokens and Scopes"

  3. Click the keyword you want to italicize. For example, we click on classa keyword to see its TextMate scope. Copy the highlighted first TextMate range ID:

    Textmate scope example

  4. Back to yours settings.json. Inside the textMateRulesarray, insert a new object whose scopeproperty is the TextMate range ID you just copied.

    "editor.tokenColorCustomizations": {
       "[YOUR THEME NAME HERE]": {
          "textMateRules": [
            {
              "scope": "storage.type.class.python",
              "settings": {
                "fontStyle": "italic"
              }
            }
          ]
       }
    }
    
  5. Save yours settings.jsonand you should see the keyboard classin italics

    class in italics

Notice

You can append more objects to the textMateRulesarray to italicize the font for more keywords. E.g:

"editor.tokenColorCustomizations": {
  "[YOUR THEME NAME HERE]": {
    "textMateRules": [
      {
        "scope": "variable.parameter.function.language.special.self.python",
        "settings": {
          "fontStyle": "italic"
        }
      },
      {
        "scope": "storage.type.class.python",
        "settings": {
          "fontStyle": "italic"
        }
      }
    ]
  }
},

Related


How can I add a slanted border or something like this site?

mashrafi In this site they use a big picture before the www.acaml.com text, then how do they handle the angle separately after these navigations? Please check the image <!DOCTYPE html> AleDP Instead of CSS borders, they use a background image (the url of the

How can I add a slanted border or something like this site?

mashrafi In this site they use a big picture before the www.acaml.com text, then how do they handle the angle separately after these navigations? Please check the image <!DOCTYPE html> AleDP Instead of CSS borders, they use a background image (the url of the

How can I add a slanted border or something like this site?

mashrafi In this site they use a big picture before the www.acaml.com text, then how do they handle the angle separately after these navigations? Please check the image <!DOCTYPE html> AleDP Instead of CSS borders, they use a background image (the url of the

How can I add a slanted border or something like this site?

mashrafi In this site they use a big picture before the www.acaml.com text, then how do they handle the angle separately after these navigations? Please check the image <!DOCTYPE html> AleDP Instead of CSS borders, they use a background image (the url of the

How can I add a slanted border or something like this site?

mashrafi In this site they use a big picture before the www.acaml.com text, then how do they handle the angle separately after these navigations? Please check the image <!DOCTYPE html> AleDP Instead of CSS borders, they use a background image (the url of the

How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

How can I make the image "normal" in a slanted div?

Wiski So I want to make a diamond with an image, but the image is distorted. I am going to make it level (normal) and fill with diamonds. code I wrote . .diamond { width: 300px; height: 300px; border: 3px solid white; outline: 2px solid black; outlin

How can I create a slanted slanted header text next to it?

Jarcena .image { min-height: 100vh; } .bg-image { background-image: url('https://picsum.photos/1440/900'); background-size: cover; background-position: center; } <!--About Us --> <div class="container-fluid"> <div class="row no-gutter"> <div cla

How can I create a slanted slanted header text next to it?

Jarcena .image { min-height: 100vh; } .bg-image { background-image: url('https://picsum.photos/1440/900'); background-size: cover; background-position: center; } <!--About Us --> <div class="container-fluid"> <div class="row no-gutter"> <div cla

How can I create a slanted slanted header text next to it?

Jarcena .image { min-height: 100vh; } .bg-image { background-image: url('https://picsum.photos/1440/900'); background-size: cover; background-position: center; } <!--About Us --> <div class="container-fluid"> <div class="row no-gutter"> <div cla

How can I create a slanted slanted header text next to it?

Jarcena .image { min-height: 100vh; } .bg-image { background-image: url('https://picsum.photos/1440/900'); background-size: cover; background-position: center; } <!--About Us --> <div class="container-fluid"> <div class="row no-gutter"> <div cla

How can I make my code clean, the code looks like this

zsf : I'm playing with aws dynamodb and want to update a specific payload field, I want to have two test cases, one is specifying the payload field with a string (eg "myPayload") because the payload field is optional and the other I do not want to. To specify

How can I make my navbar look like a picture?

Encryption 21 I have to create a navbar exactly as the picture below shows. I try all day. Below you can see the only code I could write. The problem is that I use a method from here: navigation divider , but I don't know how to place the links and borders to

How can I make my code clean, the code looks like this

zsf : I'm playing with aws dynamodb and want to update a specific payload field, I want to have two test cases, one is specifying the payload field with a string (eg "myPayload") because the payload field is optional and the other I do not want to. To specify

How can I make my navbar look like a picture?

Encryption 21 I have to create a navbar exactly as the picture below shows. I try all day. Below you can see the only code I could write. The problem is that I use a method from here: navigation divider , but I don't know how to place the links and borders to

How can I make my navbar look like a picture?

Encryption 21 I have to create a navbar exactly as the picture below shows. I try all day. Below you can see the only code I could write. The problem is that I use a method from here: navigation divider , but I don't know how to place the links and borders to

How can I make my navbar look like a picture?

Encryption 21 I have to create a navbar exactly as the picture below shows. I try all day. Below you can see the only code I could write. The problem is that I use a method from here: navigation divider , but I don't know how to place the links and borders to

How can I make my script ask for a password like sudo?

r I'm writing a script that is potentially dangerous if run the wrong way. As a security feature, I would like the script to require the user to re-enter the password first, as required sudo. So how can I do this? In other words, what should I do a) enter the

How can I make my shell behave like vim?

frame How can I make my shell behave like vim? I've seen other developers do this, but I've never installed/set it up on my computer. Ubuntu 11.04 Gary John Put this in your ~/.bashrc: set -o vi Then you can use vi keys/commands instead of emacs keys/commands

How can I make my menu buttons not look like links?

uncle I have 3 buttons on my page and I was wondering if there is a way to make them not underlined and dark blue like links. So how do I make it not underlined? understand what I meant <div class="menu"> <ul> <li class="logo"> <a href="Tr

How can I make the html layout like my images?

Vítor Nóbrega How can I define this layout in html to fill all available space on the screen? Kampatski <div style="width:100%; height:40px; background-color:red"> Top Panel </div> <div style="width:80%; height:500px; background-color:orange; float:right">Dyna

How can I make my code clean, the code looks like this

zsf : I'm playing with aws dynamodb and want to update a specific payload field, I want to have two test cases, one is specifying the payload field with a string (eg "myPayload") because the payload field is optional and the other I do not want to. To specify

How can I make my bottom page look like this?

Ben Ajax I want my bottom sheet to look like this - no background, height and width determined by content. showModalBottomSheet( context: context, elevation: 0, backgroundColor: Colors.transpa

How can I make my navbar look like a picture?

Encryption 21 I have to create a navbar exactly as the picture below shows. I try all day. Below you can see the only code I could write. The problem is that I use a method from here: navigation divider , but I don't know how to place the links and borders to

How can I make my navbar look like a picture?

Encryption 21 I have to create a navbar exactly as the picture below shows. I try all day. Below you can see the only code I could write. The problem is that I use a method from here: navigation divider , but I don't know how to place the links and borders to