Vim documentation: digraph

main help file

*digraph.txt*   For Vim version 5.7.  Last change: 1999 Sep 17


		  VIM REFERENCE MANUAL    by Bram Moolenaar



Digraphs						*digraphs* *Digraphs*

Digraphs are used to enter characters that normally cannot be entered by
an ordinary keyboard.  These are mostly accented characters which have the
eighth bit set.  The digraphs are easier to remember than the decimal number
that can be entered with CTRL-V (see |i_CTRL-V|).

1. Defining digraphs	|digraphs-define|
2. Using digraphs	|digraphs-use|
3. Default digraphs	|digraphs-default|

{Vi does not have any of these commands}

==============================================================================

1. Defining digraphs					*digraphs-define*


						*:dig* *:digraphs*
:dig[raphs]		show currently defined digraphs.

:dig[raphs] {char1}{char2} {number} ...
			Add digraph {char1}{char2} to the list.  {number} is
			the decimal representation of the character.

Vim is normally compiled with the |+digraphs| feature.  If the feature is
disabled, the ":digraph" command will display an error message.

==============================================================================

2. Using digraphs					*digraphs-use*


There are two methods to enter digraphs:			*i_digraph*
	CTRL-K {char1} {char2}		or
	{char1} <BS> {char2}
The first is always available; the second only when the 'digraph' option is
set.

If a digraph with {char1}{char2} does not exist, Vim searches for a digraph
{char2}{char1}.  This helps when you don't remember which character comes
first.

Note that when you enter CTRL-K {char1}, where {char1} is a special key, Vim
enters the code for that special key.  This is not a digraph.

Once you have entered the digraph, Vim treats the character like a normal
character that occupies only one character in the file and on the screen.
Example:
	'|' <BS> '|'	will enter the double '|' character (166)
	'a' <BS> '^'	will enter an 'a' with a hat (226)
	CTRL-K '-' '-'	will enter a minus sign (173)

The default digraphs are listed below |digraph-table| along with those for
several specific systems.  With the wrong character set, they will look
illogical.

For CTRL-K, there is one general digraph: CTRL-K <Space> {char} will enter
{char} with the highest bit set.  You can use this to enter meta-characters.

The <Esc> character cannot be part of a digraph.  When hitting <Esc>, Vim
stops digraph entry and ends Insert mode or Command-line mode, just like
hitting an <Esc> out of digraph context.

If you accidentally typed an 'a' that should be an 'e', you will type 'a' <BS>
'e'.  But that is a digraph, so you will not get what you want.  To correct
this, you will have to type <BS> e again.  To avoid this don't set the
'digraph' option and use CTRL-K to enter digraphs.

You may have problems using Vim with characters which have an ASCII value
above 128.  For example: You insert ue (u-umlaut) and the editor echoes \334
in Insert mode.  After leaving the Insert mode everything is fine.  Note that
fmt removes all characters with ASCII codes above 128 from the text being
formated.  On some Unix systems this means you have to define the
environment-variable LC_CTYPE.  If you are using csh, then put the following
line in your .cshrc:
	setenv LC_CTYPE iso_8859_1

==============================================================================

3. Default digraphs					*digraphs-default*

These are the default digraph characters for Vim.

Besides the digraphs listed below, you can enter meta characters with CTRL-K
<Space> {char}.  You cannot use <Esc> for {char}, so use CTRL-V 155 to
enter meta-ESC (CSI).

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.  This table may be
mangled if you look at it on a system that does not support digraphs or if you
print this file.

The decimal number is the ASCII code for the character.


							*digraph-table*
Default digraphs for machines that are not mentioned below:
~!  161   c|  162   $$  163   ox  164   Y-  165   ||  166   pa  167
""  168   cO  169   a-  170   <<  171   -,  172   --  173   rO  174
-=  175   ~o  176   +-  177   22  178   33  179   ''  180   ju  181
pp  182   ~.  183   ,,  184   11  185   o-  186   >>  187   14  188
12  189   34  190   ~?  191   A`  192   A'  193   A^  194   A~  195
A"  196   A@  197   AA  197   AE  198   C,  199   E`  200   E'  201
E^  202   E"  203   I`  204   I'  205   I^  206   I"  207   D-  208
N~  209   O`  210   O'  211   O^  212   O~  213   O"  214   /\  215
O/  216   U`  217   U'  218   U^  219   U"  220   Y'  221   Ip  222
ss  223   a`  224   a'  225   a^  226   a~  227   a"  228   a@  229
aa  229   ae  230   c,  231   e`  232   e'  233   e^  234   e"  235
i`  236   i'  237   i^  238   i"  239   d-  240   n~  241   o`  242
o'  243   o^  244   o~  245   o"  246   :-  247   o/  248   u`  249
u'  250   u^  251   u"  252   y'  253   ip  254   y"  255


Default digraphs for some HPUX machines:
A`  161   A^  162   E`  163   E^  164   E"  165   I^  166   I"  167
''  168   ``  169   ^^  170   ""  171   ~~  172   U`  173   U^  174
L=  175   ~_  176   Y'  177   y'  178   ~o  179   C,  180   c,  181
N~  182   n~  183   ~!  184   ~?  185   ox  186   L-  187   Y=  188
pp  189   fl  190   c|  191   a^  192   e^  193   o^  194   u^  195
a'  196   e'  197   o'  198   u'  199   a`  200   e`  201   o`  202
u`  203   a"  204   e"  205   o"  206   u"  207   Ao  208   i^  209
O/  210   AE  211   ao  212   i'  213   o/  214   ae  215   A"  216
i`  217   O"  218   U"  219   E'  220   i"  221   ss  222   O^  223
A'  224   A~  225   a~  226   D-  227   d-  228   I'  229   I`  230
O'  231   O`  232   O~  233   o~  234   S~  235   s~  236   U'  237
Y"  238   y"  239   p-  240   p~  241   ~.  242   ju  243   Pp  244
34  245   --  246   14  247   12  248   a_  249   o_  250   <<  251
xx  252   >>  253   +-  254   nu  255


Default digraphs on MS-DOS, OS/2 and Win32-console:
C,  128   u"  129   e'  130   a^  131   a"  132   a`  133   a@  134
c,  135   e^  136   e"  137   e`  138   i"  139   i^  140   i`  141
A"  142   A@  143   E'  144   ae  145   AE  146   o^  147   o"  148
o`  149   u^  150   u`  151   y"  152   O"  153   U"  154   c|  155
$$  156   Y-  157   Pt  158   ff  159   a'  160   i'  161   o'  162
u'  163   n~  164   N~  165   aa  166   oo  167   ~?  168   -a  169
a-  170   12  171   14  172   ~!  173   <<  174   >>  175   ss  225
ju  230   o/  237   +-  241   >=  242   <=  243   :-  246   ~~  247
~o  248   22  253


Default digraphs for MiNT:
C,  128  u"  129  e'  130  a^  131  a"  132  a`  133  a@  134
c,  135  e^  136  e"  137  e`  138  i"  139  i^  140  i`  141
A"  142  A@  143  E'  144  ae  145  AE  146  o^  147  o"  148
o`  149  u^  150  u`  151  y"  152  O"  153  U"  154  c|  155
$$  156  Y-  157  ss  158  ff  159  a'  160  i'   161  o'   162
u'   163  n~   164  N~   165  aa   166  oo   167  ~?   168  -a   169
a-   170  12   171  14   172  ~!   173  <<   174  >>   175  ju   230
o/   237  +-   241  >=   242  <=   243  :-   246  ~~   247  ~o   248
22   253

top - main help file

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.