Hi, is there a way to get a Unicode character from its numeric code in the REPL (without resorting to copy and paste)?
I was trying to input the ace of each card suit (spade, heart, club, diamond) based on the codepoints: U+1f0a1, U+1f0b1, U+1f0c1, U+1f0d1. I can get the character with ‘\U1f0a1’ but typing \U1f0a1 and hitting Tab does not “complete” like it does for \spadesuit for example. And using ‘\U…’ then Enter then copy-paste is a bit annoying…
Note that in the REPL (and many Julia editors that have adopted the REPL’s tab completions), you can tab-complete \spadesuit etcetera for these characters.
The help mode will tell you that:
help?> ♠
"♠" can be typed by \spadesuit<tab>
Update: I see that you actually want 🂡 (U+1f0a1) etcetera, for which we don’t (yet) have a tab completion. You could add a tab completion via:
Thanks for mentioning the push! solution, although so far I’ve only felt the need for such codes in one-off situations.
@tkluck’s solution works for me but I can see small benefits of having \U... completion in the REPL: more discoverable (for some users at least), and the Ctrl-Shift-U shortcut shows weird artefacts in some terminals (not Julia’s fault of course).