TIL about "digraphs" in (neo)vim. Need to insert, say, an en dash, which has a digraph of -N? In insert mode, ctrl-k, hypen, N. Want to check the digraph of a character already in your file? ga to show ascii, and look at the "Digr" notation. You would see e.g. "Digr =e" for the euro symbol.

:help digraphs
:help digraphs-default

#vim #neovim

@annika that’s really nifty, and ga is so helpful by itself!!

@annika

Which OS? I find that having a Compose key on my X-based systems (BSDs and Linuxen)

setxkbmap -option compose:caps

turns my caps-lock key into a Compose key, letting me enter similar sequences of characters in *any* X app (including gvim or vim in a terminal). So

«compose»a' → á
«compose»n~ → ñ

and going a bit meta there,

«compose»<< → «
«compose»>> → »
«compose»-> → →

You can even define your own in ~/.XCompose ☺

@annika I love digraphs! ^kOK and ^kXX get a lot of use for my todos
@annika Yeah digraphs are cool. I use them often 🙌