*digraph.txt* For Vim version 5.0j. Last modification: 1997 Apr 1 VIM REFERENCE MANUAL by Bram Moolenaar 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| ============================================================================== 1. Defining digraphs *digraphs-define* *:dig* *:digraphs* :dig[raphs] show currently defined digraphs. {not in Vi} :dig[raphs] {char1}{char2} {number} ... Add digraph {char1}{char2} to the list. {number} is the decimal representation of the character. Vim must have been compiled with DIGRAPHS defined. If this wasn't done, the ":digraph" command will display an error message. You can also check this with the ":version" command. If it shows "+digraphs" then it's included, "-digraphs" means it's not included. ============================================================================== 2. Using digraphs *digraphs-use* There are two methods to enter digraphs: *i_digraph* CTRL-K {char1} {char2} or {char1} {char2} The first is always available. The second only when the 'digraph' option is set. If a digraph with {char1}{char2} does not exist, a digraph {char2}{char1} is searched for. This will help when you don't remember which character comes first. Note that when you enter CTRL-K {char1}, where {char1} is a special key, the code for that special key is entered. This is not a digraph. Once you have entered the digraph the character is treated like a normal character, taking up only one character in the file and on the screen. Example: '|' '|' will enter the double '|' character (166) 'a' '^' will enter an 'a' with a hat (226) CTRL-K '-' '-' will enter a minus sign (173) The default digraphs are listed in the file "digraph.txt" |digraph_table|. There are two sets: One that is used for MS-DOS and one for the international standard character set that is mostly used on Unix systems and the Amiga. With the wrong character set they will look illogical. For CTRL-K there is one general digraph: CTRL-K {char} will enter {char} with the highest bit set. This can be used to enter meta-characters. The character cannot be part of a digraph. When hitting the entering of the digraph is aborted and Insert mode or command-line mode is ended, just like hitting an . If you accidently typed an 'a' that should be an 'e', you will type 'a' 'e'. But that is a digraph, so you will not get what you want. To correct this, you will have to type 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 > 128. For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert mode. After leaving the Insert mode everything is fine. Also fmt removes all characters with ascii > 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 in your .cshrc following line: setenv LC_CTYPE iso_8859_1 ============================================================================== 3. Default digraphs *digraphs-default* These are the default digraph characters for Vim. Besides the digraphs listed below, meta characters can be entered with CTRL-K {char}. Only cannot be used for {char}. 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 may be mangled if you look at this file on something other than the system that they were meant for or if you print it. The decimal number is the ASCII code for the character. *digraph_table* Default digraphs on non-MS-DOS, non-Win32 machines: ~! 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 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 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 and Win32: 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 vim:ts=8:sw=8:tw=78: