Vim Digraph

Was writing a few posts for my food blog and needed to type some some “special” characters like é. When on a Mac that’s really simple because the keymap supports typing compound keys. But I’m on Linux and switching between keyboard layouts is annoying. So I figured vim must have a way for typing these characters, and behold, I learned about Vim’s digraph support. The documentation is quite good but I’ll cherry pick some combos because otherwise I’ll forget.

The basic key combination is CTRL-K <base letter> <char>. For example, CTRL-K u : results in ü.

base lettercharresult
a/o/u:ä/ö/ü
ssß
12/3/4½/⅓/¼
a~ã
c,ç
=e
cO©
+-±
NO¬
Myµ
*X×
S*Σ
p*π

This is super useful and I can’t believe I never knew about this.

comments powered by Disqus