blob: 529b30d2da047192a6e77dc57b1ad1d37c5055cc [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001*digraph.txt* For Vim version 7.0aa. Last change: 2001 Sep 03
2
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6
7Digraphs *digraphs* *Digraphs*
8
9Digraphs are used to enter characters that normally cannot be entered by
10an ordinary keyboard. These are mostly accented characters which have the
11eighth bit set. The digraphs are easier to remember than the decimal number
12that can be entered with CTRL-V (see |i_CTRL-V|).
13
14There is a brief introduction on digraphs in the user manual: |24.9|
15An alternative is using the 'keymap' option.
16
171. Defining digraphs |digraphs-define|
182. Using digraphs |digraphs-use|
193. Default digraphs |digraphs-default|
20
21{Vi does not have any of these commands}
22
23==============================================================================
241. Defining digraphs *digraphs-define*
25
26 *:dig* *:digraphs*
27:dig[raphs] show currently defined digraphs.
28 *E104* *E39*
29:dig[raphs] {char1}{char2} {number} ...
30 Add digraph {char1}{char2} to the list. {number} is
31 the decimal representation of the character.
32 Example: >
33 :digr e: 235 a: 228
34< Avoid defining a digraph with '_' (underscore) as the
35 first character, it has a special meaning in the
36 future.
37
38Vim is normally compiled with the |+digraphs| feature. If the feature is
39disabled, the ":digraph" command will display an error message.
40
41Example of the output of ":digraphs": >
42 TH Þ 222 ss ß 223 a! à 224 a' á 225 a> â 226 a? ã 227 a: ä 228
43
44The first two characters in each column are the characters you have to type to
45enter the digraph.
46
47In the middle of each column is the resulting character. This may be mangled
48if you look at it on a system that does not support digraphs or if you print
49this file.
50
51The decimal number is the number of the character.
52
53==============================================================================
542. Using digraphs *digraphs-use*
55
56There are two methods to enter digraphs: *i_digraph*
57 CTRL-K {char1} {char2} or
58 {char1} <BS> {char2}
59The first is always available; the second only when the 'digraph' option is
60set.
61
62If a digraph with {char1}{char2} does not exist, Vim searches for a digraph
63{char2}{char1}. This helps when you don't remember which character comes
64first.
65
66Note that when you enter CTRL-K {char1}, where {char1} is a special key, Vim
67enters the code for that special key. This is not a digraph.
68
69Once you have entered the digraph, Vim treats the character like a normal
70character that occupies only one character in the file and on the screen.
71Example: >
72 'B' <BS> 'B' will enter the broken '|' character (166)
73 'a' <BS> '>' will enter an 'a' with a circumflex (226)
74 CTRL-K '-' '-' will enter a soft hyphen (173)
75
76The current digraphs are listed with the ":digraphs" command. Some of the
77default ones are listed below |digraph-table|.
78
79For CTRL-K, there is one general digraph: CTRL-K <Space> {char} will enter
80{char} with the highest bit set. You can use this to enter meta-characters.
81
82The <Esc> character cannot be part of a digraph. When hitting <Esc>, Vim
83stops digraph entry and ends Insert mode or Command-line mode, just like
84hitting an <Esc> out of digraph context. Use CTRL-V 155 to enter meta-ESC
85(CSI).
86
87If you accidentally typed an 'a' that should be an 'e', you will type 'a' <BS>
88'e'. But that is a digraph, so you will not get what you want. To correct
89this, you will have to type <BS> e again. To avoid this don't set the
90'digraph' option and use CTRL-K to enter digraphs.
91
92You may have problems using Vim with characters which have an ASCII value
93above 128. For example: You insert ue (u-umlaut) and the editor echoes \334
94in Insert mode. After leaving the Insert mode everything is fine. Note that
95fmt removes all characters with ASCII codes above 128 from the text being
96formatted. On some Unix systems this means you have to define the
97environment-variable LC_CTYPE. If you are using csh, then put the following
98line in your .cshrc: >
99 setenv LC_CTYPE iso_8859_1
100
101==============================================================================
1023. Default digraphs *digraphs-default*
103
104Vim comes with a set of default digraphs. Check the output of ":digraphs" to
105see them.
106
107On most systems Vim uses the same digraphs. They work for the Unicode and
108ISO-8859-1 character sets. These default digraphs are taken from the RFC1345
109mnemonics. To make it easy to remember the mnemonic, the second character has
110a standard meaning:
111
112 char name char meaning ~
113 Exclamation mark ! Grave
114 Apostrophe ' Acute accent
115 Greater-Than sign > Circumflex accent
116 Question Mark ? tilde
117 Hyphen-Minus - Macron
118 Left parenthesis ( Breve
119 Full Stop . Dot Above
120 Colon : Diaeresis
121 Comma , Cedilla
122 Underline _ Underline
123 Solidus / Stroke
124 Quotation mark " Double acute accent
125 Semicolon ; Ogonek
126 Less-Than sign < Caron
127 Zero 0 Ring above
128 Two 2 Hook
129 Nine 9 Horn
130
131 Equals = Cyrillic
132 Asterisk * Greek
133 Percent sign % Greek/Cyrillic special
134 Plus + smalls: Arabic, capitals: Hebrew
135 Three 3 some Latin/Greek/Cyrillic letters
136 Four 4 Bopomofo
137 Five 5 Hiragana
138 Six 6 Katakana
139
140Example: a: is ä and o: is ö
141
142These are the RFC1345 digraphs for the one-byte characters. See the output of
143":digraphs" for the others. The characters above 255 are only available when
144Vim was compiled with the |+multi_byte| feature.
145 *digraph-table*
146char digraph hex dec official name ~
147^@ NU 0x00 0 NULL (NUL)
148^A SH 0x01 1 START OF HEADING (SOH)
149^B SX 0x02 2 START OF TEXT (STX)
150^C EX 0x03 3 END OF TEXT (ETX)
151^D ET 0x04 4 END OF TRANSMISSION (EOT)
152^E EQ 0x05 5 ENQUIRY (ENQ)
153^F AK 0x06 6 ACKNOWLEDGE (ACK)
154^G BL 0x07 7 BELL (BEL)
155^H BS 0x08 8 BACKSPACE (BS)
156^I HT 0x09 9 CHARACTER TABULATION (HT)
157^@ LF 0x0a 10 LINE FEED (LF)
158^K VT 0x0b 11 LINE TABULATION (VT)
159^L FF 0x0c 12 FORM FEED (FF)
160^M CR 0x0d 13 CARRIAGE RETURN (CR)
161^N SO 0x0e 14 SHIFT OUT (SO)
162^O SI 0x0f 15 SHIFT IN (SI)
163^P DL 0x10 16 DATALINK ESCAPE (DLE)
164^Q D1 0x11 17 DEVICE CONTROL ONE (DC1)
165^R D2 0x12 18 DEVICE CONTROL TWO (DC2)
166^S D3 0x13 19 DEVICE CONTROL THREE (DC3)
167^T D4 0x14 20 DEVICE CONTROL FOUR (DC4)
168^U NK 0x15 21 NEGATIVE ACKNOWLEDGE (NAK)
169^V SY 0x16 22 SYNCRONOUS IDLE (SYN)
170^W EB 0x17 23 END OF TRANSMISSION BLOCK (ETB)
171^X CN 0x18 24 CANCEL (CAN)
172^Y EM 0x19 25 END OF MEDIUM (EM)
173^Z SB 0x1a 26 SUBSTITUTE (SUB)
174^[ EC 0x1b 27 ESCAPE (ESC)
175^\ FS 0x1c 28 FILE SEPARATOR (IS4)
176^] GS 0x1d 29 GROUP SEPARATOR (IS3)
177^^ RS 0x1e 30 RECORD SEPARATOR (IS2)
178^_ US 0x1f 31 UNIT SEPARATOR (IS1)
179 SP 0x20 32 SPACE
180# Nb 0x23 35 NUMBER SIGN
181$ DO 0x24 36 DOLLAR SIGN
182@ At 0x40 64 COMMERCIAL AT
183[ <( 0x5b 91 LEFT SQUARE BRACKET
184\ // 0x5c 92 REVERSE SOLIDUS
185] )> 0x5d 93 RIGHT SQUARE BRACKET
186^ '> 0x5e 94 CIRCUMFLEX ACCENT
187` '! 0x60 96 GRAVE ACCENT
188{ (! 0x7b 123 LEFT CURLY BRACKET
189| !! 0x7c 124 VERTICAL LINE
190} !) 0x7d 125 RIGHT CURLY BRACKET
191~ '? 0x7e 126 TILDE
192^? DT 0x7f 127 DELETE (DEL)
193~@ PA 0x80 128 PADDING CHARACTER (PAD)
194~A HO 0x81 129 HIGH OCTET PRESET (HOP)
195~B BH 0x82 130 BREAK PERMITTED HERE (BPH)
196~C NH 0x83 131 NO BREAK HERE (NBH)
197~D IN 0x84 132 INDEX (IND)
198~E NL 0x85 133 NEXT LINE (NEL)
199~F SA 0x86 134 START OF SELECTED AREA (SSA)
200~G ES 0x87 135 END OF SELECTED AREA (ESA)
201~H HS 0x88 136 CHARACTER TABULATION SET (HTS)
202~I HJ 0x89 137 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
203~J VS 0x8a 138 LINE TABULATION SET (VTS)
204~K PD 0x8b 139 PARTIAL LINE FORWARD (PLD)
205~L PU 0x8c 140 PARTIAL LINE BACKWARD (PLU)
206~M RI 0x8d 141 REVERSE LINE FEED (RI)
207~N S2 0x8e 142 SINGLE-SHIFT TWO (SS2)
208~O S3 0x8f 143 SINGLE-SHIFT THREE (SS3)
209~P DC 0x90 144 DEVICE CONTROL STRING (DCS)
210~Q P1 0x91 145 PRIVATE USE ONE (PU1)
211~R P2 0x92 146 PRIVATE USE TWO (PU2)
212~S TS 0x93 147 SET TRANSMIT STATE (STS)
213~T CC 0x94 148 CANCEL CHARACTER (CCH)
214~U MW 0x95 149 MESSAGE WAITING (MW)
215~V SG 0x96 150 START OF GUARDED AREA (SPA)
216~W EG 0x97 151 END OF GUARDED AREA (EPA)
217~X SS 0x98 152 START OF STRING (SOS)
218~Y GC 0x99 153 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
219~Z SC 0x9a 154 SINGLE CHARACTER INTRODUCER (SCI)
220~[ CI 0x9b 155 CONTROL SEQUENCE INTRODUCER (CSI)
221~\ ST 0x9c 156 STRING TERMINATOR (ST)
222~] OC 0x9d 157 OPERATING SYSTEM COMMAND (OSC)
223~^ PM 0x9e 158 PRIVACY MESSAGE (PM)
224~_ AC 0x9f 159 APPLICATION PROGRAM COMMAND (APC)
225| NS 0xa0 160 NO-BREAK SPACE
226¡ !I 0xa1 161 INVERTED EXCLAMATION MARK
227¢ Ct 0xa2 162 CENT SIGN
228£ Pd 0xa3 163 POUND SIGN
229¤ Cu 0xa4 164 CURRENCY SIGN
230¥ Ye 0xa5 165 YEN SIGN
231¦ BB 0xa6 166 BROKEN BAR
232§ SE 0xa7 167 SECTION SIGN
233¨ ': 0xa8 168 DIAERESIS
234© Co 0xa9 169 COPYRIGHT SIGN
235ª -a 0xaa 170 FEMININE ORDINAL INDICATOR
236« << 0xab 171 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
237¬ NO 0xac 172 NOT SIGN
238­ -- 0xad 173 SOFT HYPHEN
239® Rg 0xae 174 REGISTERED SIGN
240¯ 'm 0xaf 175 MACRON
241° DG 0xb0 176 DEGREE SIGN
242± +- 0xb1 177 PLUS-MINUS SIGN
243² 2S 0xb2 178 SUPERSCRIPT TWO
244³ 3S 0xb3 179 SUPERSCRIPT THREE
245´ '' 0xb4 180 ACUTE ACCENT
246µ My 0xb5 181 MICRO SIGN
247¶ PI 0xb6 182 PILCROW SIGN
248· .M 0xb7 183 MIDDLE DOT
249¸ ', 0xb8 184 CEDILLA
250¹ 1S 0xb9 185 SUPERSCRIPT ONE
251º -o 0xba 186 MASCULINE ORDINAL INDICATOR
252» >> 0xbb 187 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
253¼ 14 0xbc 188 VULGAR FRACTION ONE QUARTER
254½ 12 0xbd 189 VULGAR FRACTION ONE HALF
255¾ 34 0xbe 190 VULGAR FRACTION THREE QUARTERS
256¿ ?I 0xbf 191 INVERTED QUESTION MARK
257À A! 0xc0 192 LATIN CAPITAL LETTER A WITH GRAVE
258Á A' 0xc1 193 LATIN CAPITAL LETTER A WITH ACUTE
259Â A> 0xc2 194 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
260Ã A? 0xc3 195 LATIN CAPITAL LETTER A WITH TILDE
261Ä A: 0xc4 196 LATIN CAPITAL LETTER A WITH DIAERESIS
262Å AA 0xc5 197 LATIN CAPITAL LETTER A WITH RING ABOVE
263Æ AE 0xc6 198 LATIN CAPITAL LETTER AE
264Ç C, 0xc7 199 LATIN CAPITAL LETTER C WITH CEDILLA
265È E! 0xc8 200 LATIN CAPITAL LETTER E WITH GRAVE
266É E' 0xc9 201 LATIN CAPITAL LETTER E WITH ACUTE
267Ê E> 0xca 202 LATIN CAPITAL LETTER E WITH CIRCUMFLEX
268Ë E: 0xcb 203 LATIN CAPITAL LETTER E WITH DIAERESIS
269Ì I! 0xcc 204 LATIN CAPITAL LETTER I WITH GRAVE
270Í I' 0xcd 205 LATIN CAPITAL LETTER I WITH ACUTE
271Î I> 0xce 206 LATIN CAPITAL LETTER I WITH CIRCUMFLEX
272Ï I: 0xcf 207 LATIN CAPITAL LETTER I WITH DIAERESIS
273Ð D- 0xd0 208 LATIN CAPITAL LETTER ETH (Icelandic)
274Ñ N? 0xd1 209 LATIN CAPITAL LETTER N WITH TILDE
275Ò O! 0xd2 210 LATIN CAPITAL LETTER O WITH GRAVE
276Ó O' 0xd3 211 LATIN CAPITAL LETTER O WITH ACUTE
277Ô O> 0xd4 212 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
278Õ O? 0xd5 213 LATIN CAPITAL LETTER O WITH TILDE
279Ö O: 0xd6 214 LATIN CAPITAL LETTER O WITH DIAERESIS
280× *X 0xd7 215 MULTIPLICATION SIGN
281Ø O/ 0xd8 216 LATIN CAPITAL LETTER O WITH STROKE
282Ù U! 0xd9 217 LATIN CAPITAL LETTER U WITH GRAVE
283Ú U' 0xda 218 LATIN CAPITAL LETTER U WITH ACUTE
284Û U> 0xdb 219 LATIN CAPITAL LETTER U WITH CIRCUMFLEX
285Ü U: 0xdc 220 LATIN CAPITAL LETTER U WITH DIAERESIS
286Ý Y' 0xdd 221 LATIN CAPITAL LETTER Y WITH ACUTE
287Þ TH 0xde 222 LATIN CAPITAL LETTER THORN (Icelandic)
288ß ss 0xdf 223 LATIN SMALL LETTER SHARP S (German)
289à a! 0xe0 224 LATIN SMALL LETTER A WITH GRAVE
290á a' 0xe1 225 LATIN SMALL LETTER A WITH ACUTE
291â a> 0xe2 226 LATIN SMALL LETTER A WITH CIRCUMFLEX
292ã a? 0xe3 227 LATIN SMALL LETTER A WITH TILDE
293ä a: 0xe4 228 LATIN SMALL LETTER A WITH DIAERESIS
294å aa 0xe5 229 LATIN SMALL LETTER A WITH RING ABOVE
295æ ae 0xe6 230 LATIN SMALL LETTER AE
296ç c, 0xe7 231 LATIN SMALL LETTER C WITH CEDILLA
297è e! 0xe8 232 LATIN SMALL LETTER E WITH GRAVE
298é e' 0xe9 233 LATIN SMALL LETTER E WITH ACUTE
299ê e> 0xea 234 LATIN SMALL LETTER E WITH CIRCUMFLEX
300ë e: 0xeb 235 LATIN SMALL LETTER E WITH DIAERESIS
301ì i! 0xec 236 LATIN SMALL LETTER I WITH GRAVE
302í i' 0xed 237 LATIN SMALL LETTER I WITH ACUTE
303î i> 0xee 238 LATIN SMALL LETTER I WITH CIRCUMFLEX
304ï i: 0xef 239 LATIN SMALL LETTER I WITH DIAERESIS
305ð d- 0xf0 240 LATIN SMALL LETTER ETH (Icelandic)
306ñ n? 0xf1 241 LATIN SMALL LETTER N WITH TILDE
307ò o! 0xf2 242 LATIN SMALL LETTER O WITH GRAVE
308ó o' 0xf3 243 LATIN SMALL LETTER O WITH ACUTE
309ô o> 0xf4 244 LATIN SMALL LETTER O WITH CIRCUMFLEX
310õ o? 0xf5 245 LATIN SMALL LETTER O WITH TILDE
311ö o: 0xf6 246 LATIN SMALL LETTER O WITH DIAERESIS
312÷ -: 0xf7 247 DIVISION SIGN
313ø o/ 0xf8 248 LATIN SMALL LETTER O WITH STROKE
314ù u! 0xf9 249 LATIN SMALL LETTER U WITH GRAVE
315ú u' 0xfa 250 LATIN SMALL LETTER U WITH ACUTE
316û u> 0xfb 251 LATIN SMALL LETTER U WITH CIRCUMFLEX
317ü u: 0xfc 252 LATIN SMALL LETTER U WITH DIAERESIS
318ý y' 0xfd 253 LATIN SMALL LETTER Y WITH ACUTE
319þ th 0xfe 254 LATIN SMALL LETTER THORN (Icelandic)
320ÿ y: 0xff 255 LATIN SMALL LETTER Y WITH DIAERESIS
321
322 vim:tw=78:ts=8:ft=help:norl: