intellij-idea - 启用/禁用 IntelliJ 的花哨≠(不等于)运算符

我在 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/

相关文章:

string - 如何 fmt.Printf 带有千位逗号的整数

java - 如何使用 Java 漂亮地打印现有的 JSON 数据?

html - 为什么 HTML 要求多个空格在浏览器中显示为单个空格?

java - IntelliJ 折叠单行方法

c# - 在 Resharper 中为对象和数组初始化程序获取正确的缩进

r - 在 ggplot2 中使用 scale_x_date 格式化日期

c# - 一次格式化 Visual Studio 项目中的所有文件

python - 将某些 float 数据框列格式化为 Pandas 中的百分比

emacs - 在 emacs 中自动格式化源文件

visual-studio-2010 - 在 ReSharper for Visual Studio