如何配置IDEA自动用=>
和⇒
替换->
和→
?
看一下使用IntelliJ的“实时模板”的this question and answer,在这种情况下,XML格式的scalaz映射保存为文件而不是从GUI输入。我想这与scalaz一样好,因为所有unicode别名函数和方法都已存在。
Scalariform将为您执行此操作(如果已正确配置)。我想你想要的是能够自动将这些序列扩展为相关的unicode字符的东西。老实说,我不知道这是否可以在IDEA中实现。
使用我正在使用的IntelliJ 2016.1.4,事情变得更加容易。
File -> (Other Settings-> Default Settings) |Settings -> Editor -> Code Style -> Scala
选择标签Other
Replace => with unicode symbol
Replace -> with unicode symbol
但是,如果想要支持scalaz中的其他unicode字符,那么也许,Live Template可能仍然是可行的方法。我还没有验证。
请按照图片中的步骤操作: