Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@renatorib
Last active January 11, 2024 06:45
Show Gist options
  • Star 50 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save renatorib/a0d7af29133c8a775b0740d0b67e32a8 to your computer and use it in GitHub Desktop.
Save renatorib/a0d7af29133c8a775b0740d0b67e32a8 to your computer and use it in GitHub Desktop.
Using Operator Mono with Fira Code ligatures in Atom.

Using Operator Mono with Fira Code ligatures in Atom.

  1. Open your Atom's Stylesheet
    image

  2. Put this css

atom-text-editor {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-family: "Operator Mono";
  font-weight: 500;
  line-height: 1.7;
}

For Atom version < 1.13.x

atom-text-editor::shadow {
  .storage.type.function.arrow,
  .keyword.operator:not(.accessor),
  .punctuation.definition.entity.css {
    font-family: 'Fira Code';
  }

  .string.quoted,
  .string.regexp {
    -webkit-font-feature-settings: "liga" off, "calt" off;
  }
}

For Atom version >= 1.13.x

atom-text-editor.editor {
  .syntax--storage.syntax--type.syntax--function.syntax--arrow,
  .syntax--keyword.syntax--operator:not(.accessor),
  .syntax--punctuation.syntax--definition {
    font-family: "Fira Code";
  }

  .syntax--string.syntax--quoted,
  .syntax--string.syntax--regexp {
    -webkit-font-feature-settings: "liga" off, "calt" off;
  }
}

Save file and it's done.


Works fine with Javascript:

image

@cziem
Copy link

cziem commented Sep 14, 2018

You are my hero. I hadn't even thought to do this. I use Operator Mono, and sorely miss my ligatures from Fira Code. Thank you so much! I already have a lot of tweaks in my CSS to user OM's script italics for more than just comments. Perfect addition.

screen shot 2017-01-11 at 11 07 59 pm

How did you tweak yours please.?

@ikluhsman
Copy link

@Phavor
Open Atom's stylesheet in Atom > Stylesheet..

Modify the sections to look like the following, the spans are the important part. You can find these class names by browsing through the editor in syntax of your choice using the developer tools (Option+Cmd+I).

`atom-text-editor.editor {

.syntax--storage.syntax--type.syntax--function.syntax--arrow,
.syntax--keyword.syntax--operator:not(.accessor),
.syntax--keyword.syntax--type,
.syntax--punctuation.syntax--definition {
font-family: "Fira Code";
}

span.syntax--keyword.syntax--control,
span.syntax--storage.syntax--type,
span.syntax--storage.syntax--modifier {
font-family: "Operator Mono";
font-style: italic;
}
`

@cedrus-8864
Copy link

You are my hero. I hadn't even thought to do this. I use Operator Mono, and sorely miss my ligatures from Fira Code. Thank you so much! I already have a lot of tweaks in my CSS to user OM's script italics for more than just comments. Perfect addition.

screen shot 2017-01-11 at 11 07 59 pm

What syntax theme and TextMate rules are you using? It's look nice. Thanks.

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