Hello again, JD here. Today I'm writing about how to install FiraCode on Windows and Ubuntu. This post is copying and pasting some commands on the console (at least that's the way I do it). So let's get to it.
FiraCode is a monospaced font with programming ligatures developed by Nikita Prokopov (tonsky on GitHub).
Fira Code: free monospaced font with programming ligatures
Programmers use a lot of symbols, often encoded with several characters. For the human brain, sequences like
:= are single logical tokens, even if they take two or three characters on the screen. Your eye spends a non-zero amount of energy to scan, parse and join multiple characters into a single logical one. Ideally, all programming languages should be designed with full-fledged Unicode symbols for operators, but that’s not the case yet.
Fira Code is a free monospaced font containing ligatures for common programming multi-character combinations. This is just a font rendering feature: underlying code remains ASCII-compatible. This helps to read and understand code faster. For some frequent sequences like
//, ligatures allow us to correct spacing.
Download & Install
Fira Code is a…
To install FiraCode on Windows we are going to use Chocolatey.
Note: If you have Python installed on Windows, I suggest you run the following command to verify if you have Chocolatey installed. Python installs Chocolatey to fetch some dependencies.
If it returns the version number, then you're all set and you can jump directly to FiraCode command. If it doesn't, then run one of the following commands with administrative permissions to install Chocolatey.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Finally, run this command to install FiraCode:
choco install firacode
And voilà! We've got FiraCode installed on Windows!
To install FiraCode on Ubuntu you have to enable the universe repository. To do this we have to run the following commands on the terminal:
sudo add-apt-repository universe sudo apt update
If that command doesn't work, try this one instead:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" sudo apt update
And finally, run the command:
sudo apt install fonts-firacode
Ta-da! FiraCode is now on Ubuntu!
That's it! We've successfully installed FiraCode on both Windows and Ubuntu! Let me know in the comments if this was helpful, or if there's something I should improve! 😁