for some programming languages like Ada and Coq it is very common to use unicode symbols such as Γ, α, etc…
Most users input these symbols using variants of emacs TeX-input-method, which is basically a method that will recognize \alpha and insert α, providing autocompletion whenever the user presses \.
I’d like to give this feature a go in CodeMirror, any particular advice?
You should be able to do this by listening to "inputRead" events and scanning backwards to see if there’s a matching backslash-name there, and then if there is, replacing it with the appropriate character.
Thanks @marijn, very interesting. I was thinking however of using hint/show-hint.js, do you think that is not possible?
Sorry if I wasn’t very clear before, (discuss ate my backslash), in TeX-input-method, when the user presses \, this has the effect of activating the TeX completion command, and if they enter a recognized symbol, it is then replaced.