) is the common lexical id...">

What is the keyboard shortcut for ⇒ in your Scala editor?

The Unicode \u21D2 " " operator (sometimes referred to as => ) is the common lexical identifier prevailing in the Scala programming language used in functional combinators, function definitions, case arguments, etc. I usually have to copy and paste this statement into my code from another place, but this can be very annoying.

Does anyone know of shortcuts for creating this symbol in your IDE? I usually use programs like JetBrains IntelliJ, SublimeText, and VIM.

+5
source share
3 answers

IntelliJ IDEA under

Settings -> Editor -> CodeStyle -> Scala

In the "Other" tab, there are options for automatically inserting multiple characters in Unicode.

enter image description here

+8
source

In IntelliJ, I created a live form template of $PARAMS$ ⇒ $BODY$ . This makes it easy to insert the symbol.

0
source

For emacs, there (global-prettify-symbols-mode) , which simply displays over => . It still writes => to the file at the end.

0
source

All Articles