created March 15, 2001 · complexity basic · author Anonymous · version 5.7
To enter "special" characters such as the Euro symbols or copyright symbol, or diacritic marks such as the German umlaut or accent grâve digraphs can be used.
Digraphs work by entering pressing CTRL-K and a two letter combination, for example, in insert mode type:
CTRL-K a: CTRL-K e>
to give ä and ê.
You can also set the digraph option: :set digraph (or :set dg)
With the digraph option set you can enter
a <BS> : e <BS> >
to give the same result.
To list the currently defined digraphs type: :dig[raphs]
Here is a small example output of the :digraphs command:
Ct ¢ 162 Pd £ 163 Cu ¤ 164 Ye ¥ 165 e! è 232 e' é 233 e> ê 234 e: ë 235
The first two characters in each column are the characters you have to type to
enter the digraph.
In the middle of each column is the resulting character.
The decimal number normally is the Unicode number of the character.
See also
- :help digraph-table
- :help digraph.txt
- :help digraphs-changed Vim 6.0 and later use the RFC1345 mnemonics.
- cream-ascii
- Working with Unicode