I can't seem to get digraphs working for me in GVIM. According to this site (and the VIM wiki) I should be able to enter the mu character µ by being in insert mode then either Ctrl-Km* or Ctrl-Q956.
It's driving me mad... I hate using u when I mean µ. I normally use Alt-0181 but that doesn't work in VIM either!
In addition to Ingo's answer, make sure that you (or one of your plugins) haven't remapped any keys. If you're using UltiSnips, for example, it remaps Ctrl-k in insert mode, so the first method you tried won't work. Since you're seeing a literal *
, I suspect that's what's preventing that one from working.
To see if the key is mapped, and where it was mapped from, enter:
:verbose imap <C-k>
If it's mapped, you can remap it to something else, or just use the Ctrl-q solution.
For example, to make Ctrl-y perform the built-in digraph function, enter:
:inoremap <C-y> <C-k>
To make that permanent, put the line in your ~/.vimrc
(without the leading :
).
:help i_CTRL-V_digit
explains that the decimal number entry only works up to 255. To use that method, you'd have to enter the hexadecimal value 03BC
. The keystrokes therefore would be <C-Q>u03bc
.
The digraph method should work, too. Do you press Ctrl and K, together, then release both, then type first m
, then *
individually?
Depending on the font, Vim may not be able to correctly display the character. You can use ga
over it to verify its character codes.
Also, your encoding must support the character. Best use :set encoding=utf-8
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With