I witnessed this in the GOTO 2016 • Kotlin - Ready for Production conference by Hadi Hariri.
In some of his code, what would normally look like:
if (x != y) { /* do some stuff */ }
Is being displayed in an elegant style:
if (x ≠ y) { /* do some stuff */ }
Here's a screen-shot from the live coding session, marked up to underle the ≠
operator:
He's using the regular !=
operator, the IDEA is taking care of the rest.
I've been playing with my IntelliJ's configuration but couldn't enable this new fancy feature. Any help?
You can also type Alt+8800 , and this will type the does not equal sign in any of the Suite Office apps.
To enable ligatures, go to the Settings → Editor → Colors & Fonts → Font, choose a font that supports ligatures, e.g. FiraCode, Hasklig, Monoid or PragmataPro (the font has to be installed) and select the Enable font ligatures option.
Source: link.
To preview some fonts, including several with ligatures: https://app.programmingfonts.org/
This is the "font ligatures" feature, which uses ligatures to combine the characters in fonts that support them. This feature is disabled by default in the standard editor, and enabled by default in the Reader mode introduced in 2020.3.
This feature can be enabled & disabled for the current project in the project settings window (File | Settings…
in Windows and Linux or IntelliJ IDEA | Preferences…
in macOS).
The settings are located in the settings window at:
Editor | Font
-> "Enable font ligatures" checkboxEditor | Reader Mode
-> "Font ligatures" checkboxIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With