says that to enter an emoji such as smiley_face, type:
:smi + [TAB]
So I did type “:smi” (without quotes) and pressed TAB in the nteract cell. Nothing happens! In particlar, no list of possible completions to select from.
I tried same thing in a Terminal Julia REPL. Likewise, nothing happens.
You have missed a \ before the :, it works for me if I do:
julia> \:smi<I tabbed here>
\:smile: \:smiley: \:smiling_imp: \:smirk_cat:
\:smile_cat: \:smiley_cat: \:smirk:
julia> \:smile:<then I tabbed again and it become the below>
julia> 😄
Sorry I’m not answering the question for MacOs, but for future reference. In windows os, one can use the key combination: Win+ . to bring up the build-in emoji keyboard. This is my default way of doing Emoji programming
If you continue typing, for example continue typing cry you get Emoji suggestions
cry
Hello @murrayE and welcome to Julia. Please can I ask you to do something? Stick with it. People on this forum are very helpful and will happily answer questions about small issues.
Often there are posts form people who are frustrated that their particular setup does not work first time, or that a certain package does not load.
But if you stick with it and ask questions everything gets solved.
If you write \:smiley_cat and press enter, Julia will interpret it as if you are trying to perform the \ operation on the variable called :smiley_cat. Because \ is an operator that needs two inputs (result = A \ B) the error you get is telling you that this operator expects more than one input.
In the other side what you want to do (write an emoji through some combination of keys) is a different process operated by the REPL or by your IDE, so it has a different way of doing it than evaluating something in the REPL. So basically the answer to “why TAB completion works with TAB and not with enter” would be because it was designed that way (and using enter would conflict with the operations sent to julia).
Heh. I often flag up the Obfuscated Perl contest - which resulted in things like programs written in white space, and Latin.
However I will make an exception - this sounds fun!
Also flags up a feature of Julia which I like - if you do not like or consistently mistype a function just do
I have no particular use for emojis in programming. I was just trying to follow along with a very first tutorial introduction and got stuck because of incomplete explanation about :smi etc.
While I appreciate just seeing examples, I expect some insinuation of semantics and syntax for such things.
I have a similar problem!
Entering +tab into Terminal (vscode) gives me a picture of a rabbit, but repeating the same key sequence in the .jl Editor window does not! All that I get is the ! I have tried \ and /. There is a rabbit character which I can cut & paste from a document, but I would rather know how I can type it in without documents?