I just ended a post about inserting special characters in VIM with the remark that I should find out how to insert special punctuation marks using just XKB, so I set out to find out how to add these to the list of existing compose options for XKB. Turns out that I should have simply taken another look at the configuration file for Compose mode (/usr/X11R6/share/X11/locale/en_US.UTF-8/Compose on my system).
Now I learned how to easily type a bunch of characters that I find myself using so often that I know their Unicode numbers by heart. This going to save my a ton of time and annoyance, and there’s no longer any need to remember the VIM digraphs either, although these were equally easy to remember.
Char. | XML | HTML | XKB compose |
---|---|---|---|
— | — | — | Compose - - - |
– | – | – | Compose - - . |
… | … | … | Compose . . |
‘ | ‘ | ‘ | Compose < ' |
’ | ’ | ’ | Compose > ' |
“ | “ | “ | Compose < " |
” | ” | ” | Compose > " |
I’ve been having some issues with not all compose sequences working (the same) in some applications such as Firefox. I just learned that this is because GTK apps don’t use XIM by default. For now I’ve solved it the quick and dirty way by setting an environment variable:
GTK_IM_MODULE=xim