skip to Main Content

I’m wondering how I can prevent conditional operators like !== from looking like this:

enter image description here

I just want them to look like <= >= etc. as I read them easier.

2

Answers


  1. These "operators styling/shortening" are called Ligatures. Writing style makes reading easy and convenient and can make your editor look better with awesome fonts along with ligatures.

    Check out your settings.json in VSC for:

    "editor.fontLigatures": true
    

    If you want to turn off font ligatures for a specific programming language (ex. PHP), than add this lines to a settings.json file in VSC:

    {
      "editor.fontLigatures": true,
      "[php]": {
        "editor.fontLigatures": false
      }
    }
    
    Login or Signup to reply.
  2. These are called "ligatures". If you want to enable or disable ligatures on a fine-grained basis, consult your font’s documentation to see whether and how it is supported. VS Code supports configuring font ligatures in the same way as browsers do via CSS (since VS Code is browser-based): font-feature-settings in its editor.fontLigatures setting.

    For example, for Fira Code, see its readme. Its equality operator ligatures are controlled by ss08. Its other comparison operators are controlled by ss02, cv19, cv20, cv23.

    If you want to completely disable ligatures, set editor.fontLigatures to false.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search