Operator Mono & Sublime Text 3

Scott LaPlant
2 min readJan 2, 2017

--

Like a lot of developers, I’m in love with the Operator Mono Font, by Hoefler & Co.. If you’re looking at code all day, it should be fun & appealing.

Operator Mono doesn’t work with all Sublime Text 3 themes out of the gate (I’m looking at you Soda Theme). Making it work is not difficult to correct. We just need to add some info to your favorite color theme so it will use the specific font styles with your favorite attributes.

In order to begin, you’ll need to install the excellent Package Resource Viewer. I’m assuming you have PackageControl installed as well. If not, you can get that here.

Once you have both installed, use the command > shift > p key combination (on a PC it would be control > shift > p) to bring up the package control window and type ‘prv’. Select ‘Package Resource Viewer: Open Resource’.

PackageResourceViewer: Open Resource

Scroll down until you find the option: ‘Color Scheme — Default’ and select it.

Color Scheme — Default

That will take you to all the installed color themes. Select the color theme you’re interested in tweaking and add the following:

<! — Operator Tweaks →

<dict>
<key>name</key>
<string>Italic HTML attribute names</string>
<key>scope</key>
<string>
entity.other.attribute-name.html,
entity.other.attribute-name.event.html,
entity.other.attribute-name.id.html,
entity.other.attribute-name.class.html,
entity.other.attribute-name.tag.jade,
constant.other.symbol.ruby,
</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ffc600</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>

<! — End Operator Tweaks →

Hat tip to Wes Bos. He offered up his tweaked Cobalt2 theme with the necessary info. Thanks Wes!

--

--