我在 GOTO 2016 • Kotlin - Ready for Production 中见证了这一点 session 由 Hadi Hariri .
在他的一些代码中,通常看起来是这样的:
if (x != y) { /* do some stuff */ }
正以优雅的风格展示:
if (x ≠ y) { /* do some stuff */ }
代码使用常规的 !=
运算符,其余的由 IDEA 处理。
那么,我该如何启用/禁用此功能?
最佳答案
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.
来源:link .
要预览一些字体,包括一些带有连字的字体:https://app.programmingfonts.org/
https://stackoverflow.com/questions/41774046/