I find that the behavior in VSCode for the handling of unicode completion surprising. In the folloiwng examples, I will denote the position of the cursor when i hit the tab key (for autocompletion) <TAB> :
myfunction(\alpha<TAB> works as expected.
myfunction(\alpha<TAB>) also works.
myfunction(\alpha<TAB>hat) does not.
myfunction(\alpha<TAB> hat) does work (notice the space after the cursor).
Although, in the REPL, the three work as expected and write a α. This is frustrating as it happens a lot with my naming conventions. Is this expected, or am I missing some configuration options ?
It seems like if there is a letter after the cursor, it does not work, while if there is something else (a space, a closing parenthesis, a + sign…) it does, although the REPL works whatever you have after the cursor (which is in my oppinon a better choice).
Better still is to get a utility such as Ukelele (mac) that allows you to assign Unicode characters to keystrokes and chords. For your example, I’m able to do <ALT>-a<ALT>-,
If you are just referring to typing part of the name with a leading ⍺ and getting tab completion, then I can’t reproduce your problem at the REPL inside or outside of VS Code.
On a related note, I wish the VSCode extension had some sort of “Greek mode” where we could switch to the Greek alphabet in the keyboard temporarily. That is, typing a, b, d, … would be automatically converted into the unicode alpha, beta, delta, …
Yes i think you understood what i wanted, and this is exactly the behavior i am NOT getting. For me, when hitting TAB with the cursor right after \alpha in this example, nothing happens.
Yep, does not help, sadly. But it also looks like the proposed shortcuts from this extensions are not showing up at all in the autocompletion menu : for example, while \forall is there (added by the Julia extension), \all is not (while the README of Fast Unicode Math Characters mentions it explicitly as a shortcut for the same Unicode character). Therefore, I might have an issue with the installation of said extension, I might have to take another look.