Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to write lambda letter (λ) in IntelliJ IDEA?

I would like to use this interface: http://javaslang.com/javadoc/2.0.0-RC2/javaslang/%CE%BB.html

Fortunately auto completion works, if I start from package name. But is it possible to write lamda greek letter in IntelliJ IDEA or generally in any editor?

like image 606
Michal Przysucha Avatar asked Dec 02 '15 15:12

Michal Przysucha


Video Answer


2 Answers

This is all about your keyboard and OS, and not specific to Intellij IDEA. You can create one by copy and pasting, which is pretty easy. If you want to insert it directly then use the way of typing special characters specific to your platform (Windows, Mac, Linux, ...).

So for example on Mac you could:

  • Do Edit > Special Characters and click on the gear wheel at the top left, select Customize and check the box for Greek. Double click or drag drop to input.
  • Go to system prefs/language & text/input sources and check the box for Greek, plus the box for Show Input Menu in Finder. Then select Greek from the "flag" menu at the top right of the screen and type.

There are also some suggestions on the Wikipedia article on entering special characters, though IntelliJ may intercept some of these.

I have to admit, I always just copy and paste.

like image 69
Nick Fortescue Avatar answered Oct 08 '22 20:10

Nick Fortescue


You can express any Unicode character anywhere in Java source code via the \udddd form. It is not just for Strings and chars. (For characters outside the BMP, you need two of those, forming a surrogate pair.) Inasmuch as there sometimes are multiple characters with similar glyphs, Unicode escapes have the advantage of being totally unambiguous.

Presumably the character wanted in this case is the one Unicode names "Greek small letter lamda", U+03BB, which you can express anywhere in Java source code as \u03bb.

like image 2
John Bollinger Avatar answered Oct 08 '22 22:10

John Bollinger