Programming for such a long time and only now found the Fira Code font.
Some screenshots to show how nice this looks.
Example for an if statement where we check for nil, using a “not same” or “not equal”:
if err != nil { continue }
The != sign reads as a not equal character. Now if you have Fira Code installed, this looks like the following
Same goes for golang channel communication, instead of <- , two characters, you’ll see it as one character.
As mentioned on the page:
Problem description: Programmers use a lot of symbols, often encoded with several characters. For the human brain, sequences like
->
,<=
or:=
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.
Please have a look at the Fira Code font page for more information and to program with proper unicode symbols for operators.
Installation on Windows with WSL
You can also install the Fira code on windows while working in the ubuntu-app.
Installation on windows is usually just double-clicking the *.ttf font files.
Following step can be executed in the ubuntu-app to install the app in ubuntu:
sudo apt install fonts-firacode
The above line will install the firacode fonts in ubuntu.
Then in visual studio code you can configure to use the font in the settings:
File -> Preferences -> Settings -> search for "Fonts"and select Remote - WSL Ubuntu
"editor.fontFamily": "'Fira code', Consolas, 'Courier New', monospace", "editor.fontLigatures": true
Happy coding!