问题
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:
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?
PS. I'm using the latest Ultimate version (2016.3.3).
回答1:
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/
来源:https://stackoverflow.com/questions/41774046/enabling-intellijs-fancy-%e2%89%a0-not-equal-to-operator