Tips under vim insert mode
Delete characters in Insert mode
When in vim's insert mode is that you want to delete a character or generally use the Backspace key to enter the normal mode to operate
as, in fact, can also be used Ctrl-w
to remove the cursor before a word is used Ctrl+u
may have been deleted to the line
first, use the Ctrl-h
delete The cursor before a character.
This is not just a few shortcuts can be used in vim insert mode. Vim are also in the command mode and bash,
may be used.
Insert normal mode
vim insert mode can only be used for typing, but sometimes we usually want to execute a command in Normal mode, but
in order to execute a command and cut into the normal mode seems to have a little wasted.
This time we can use <Ctrl-o>
to enter insert normal mode.
For example, we edit a text file one line at the top of the screen, then we want to perform in insert mode zz
command
order, the current line is displayed in the middle of the screen, we can use <Ctrl-o> zz
. Without leaving the insert molding
type.
Paste text without leaving insert mode
In the insert mode, use <Ctrl-r>{register}
can be specified in the content of the register in the insert mode stick
attached to the current cursor position.
Calculated in insert mode
Still <Ctrl-r>=
, and then enter the formula to be calculated.
3921*324=1270404