2 ms·
I just use the builtin `abbrev` for that. I took the idea from http://home.thep.lu.se/~karlf/emacs.html#sec-7-2 http://home.thep.lu.se/~karlf/emacs.html#sec-7-
by mftrhu 7y ago
I just use the builtin `abbrev` for that. I took the idea from http://home.thep.lu.se/~karlf/emacs.html#sec-7-2 http://home.thep.lu.se/~karlf/emacs.html#sec-7-2 , and defined a bunch of global abbrevs under the `8` "namespace", for greek letters, mathematical symbols, and random unicode characters (a few ASCII ones, too).
One cool thing about `abbrev` is that it can also expand a function instead of a sequence of characters - e.g.,
("9ts" "" (lambda () (insert (format-time-string "%Y-%m-%d %H:%M"))))
It's pretty handy when I access emacs from Termux, as I don't have to bother with switching the input method or long pressing (which is an issue even with Hacker's Keyboard, trying to insert `\`).