📄 digraph.txt
字号:
*digraph.txt* For Vim version 5.8. Last change: 1999 Sep 17 VIM REFERENCE MANUAL by Bram MoolenaarDigraphs *digraphs* *Digraphs*Digraphs are used to enter characters that normally cannot be entered byan ordinary keyboard. These are mostly accented characters which have theeighth bit set. The digraphs are easier to remember than the decimal numberthat 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 isdisabled, 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 isset.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 comesfirst.Note that when you enter CTRL-K {char1}, where {char1} is a special key, Vimenters the code for that special key. This is not a digraph.Once you have entered the digraph, Vim treats the character like a normalcharacter 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 forseveral specific systems. With the wrong character set, they will lookillogical.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>, Vimstops digraph entry and ends Insert mode or Command-line mode, just likehitting 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 correctthis, 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 valueabove 128. For example: You insert ue (u-umlaut) and the editor echoes \334in Insert mode. After leaving the Insert mode everything is fine. Note thatfmt removes all characters with ASCII codes above 128 from the text beingformated. On some Unix systems this means you have to define theenvironment-variable LC_CTYPE. If you are using csh, then put the followingline 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 toenter meta-ESC (CSI).The first two characters in each column are the characters you have to type toenter the digraph.In the middle of each column is the resulting character. This table may bemangled if you look at it on a system that does not support digraphs or if youprint this file.The decimal number is the ASCII code for the character. *digraph-table*Default digraphs for machines that are not mentioned below:~!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -