插入模式
Make Corrections Instantly from Insert Mode
Meet Insert Normal Mode
e.g. <C-o>zz
Get Back to Normal Mode
Paste from a Register Without Leaving Insert Mode
The <C-r><C-p>{register}
command is smarter. It inserts text literally and fixes
any unintended indentation (see :h i_CTRL-R_CTRL-P ).
Do Back-of-the-Envelope Calculations in Place
Insert Unusual Characters by Character Code
例子:
<C-v>{code}
: <C-v>065
<C-v>u{1234}
: <C-v>u00bf
See :h i_CTRL-V_digit for more details.
Insert Unusual Characters by Digraph
Digraphs are easy to use. From Insert mode, we just type <C-k>{char1}{char2}
.
So if we wanted to insert the “¿” character, which is represented by the digraph
?I, we would simply type <C-k>?I
.
The character pairs that make up a digraph are chosen to be descriptive,
making them easier to remember or even guess. For example, the doubleangle quotation marks « and » are represented by the digraphs << and >>;
the vulgar (or common) fractions ½, ¼, and ¾ are represented by the digraphs
12, 14, and 34, respectively. The default set of digraphs that ship with Vim
follows certain conventions, which are summarized under :h digraphs-default .
We can view a list of the available digraphs by running :digraphs, but the output
of this command is difficult to digest. A more usable list can be found by
looking up :h digraph-table .