Give ligatures a chance
Tags: programming, coding, font, ligatures
Published: 2018-08-14 13:06:12

---
title: Give ligatures a chance
published: true
description: How can a change of IDE font improve your coding experience
tags: programming, coding, font, ligatures
---

##What are ligatures anyway?

Do you find yourself constantly changing and tweaking your development editor by changing color schemes, font size, line size or tab size to improve your coding exprience?
Do you find yourself staring at a piece of code for too long just to realize you're looking at a simple lambda function with a piece of math?

Well then, you probably lack ligatures and you don't even know it! Ligatures is a font feature, that allows you to display multiple consecutive characters as one custom glyph! 
If you've ever used Microsoft Word, it's substitution rules are very close to what ligatures are; with a difference, that Word really replaces the text with a substitution so original text is gone. In contrast, ligatures look like one character only when:
* you use font with ligatures
* you use editor that supports ligatures
* you have ligatures enabled

If you don't have one of these your code will look as usual; without any improvements.

##What can it do for me?

Ligatures generally improve readability by making special character combinations distict and as well, making your code shorter by reducing the width of your code by displaying one shorter glyph instead of 2 or sometimes 3 regular width ones.

Let's look at an example:
![font ligatures picture](https://raw.githubusercontent.com/tonsky/FiraCode/master/showcases/all_ligatures.png "Font ligatures in action")

The funny thing is that within an editor a ligature acts as a single glyph so you can cop and paste it as a single character. In the underlying file it will, however, take space as multiple characters depending on ligature code.

So let's have a look at some sample code with ligatures:
![ligatures in editor](http://oi67.tinypic.com/11ceiox.jpg "Font ligatures in VS Code")

Notice especially:
* the for loop -->
* == comparison
* </ html tags

Very easy on the eyes enhanced by easily identifiable logic operators and markup formatting.

##Where can I get it?

There are multiple fonts that support ligatures.

My favorite free one is [Fira Code](https://github.com/tonsky/FiraCode).

There are other alternatives as:
* [Hasklig](https://github.com/i-tu/Hasklig) (free)
* [Monoid](http://larsenwork.com/monoid/) (free)
* [Fixedsys Excelsior](https://github.com/kika/fixedsys) (free)
* [Iosevka](https://be5invis.github.io/Iosevka/) (free)
* [DejaVu Sans Code](https://github.com/SSNikolaevich/DejaVuSansCode) (free)
* [PragmataPro](http://www.fsd.it/fonts/pragmatapro.htm) (paid)

But hey, you mentioned editor support! And you're right, ligatures do not work everywhere! So here's some overview.
Working in:
* VS Code (including VS Exploration)
* Microsoft Visual Studio 2015+ (including Community edition) - currently a bug in WPF prevents ligatures with minus/dash sign (like -->) to be converted
* JetBrains editors (CLion, Intellij, PHPStorm, WebStorm, PyCharm, Rider, ...)
* Notepad++ (workaround needed)
* Sublime Text
* Xamarin Studio
* XCode
* gEdit
* Atom based editors (1.1+)
* Android Studio

For complete support have a look at the list of [working and non-working editors](https://github.com/tonsky/FiraCode#editor-support) and [as well as terminals](https://github.com/tonsky/FiraCode#terminal-support)!