Objective
Vim is Linux under quite a piece of text processing artifact Also, is VI Editor upgrade version, the full name of the VI improved. and VI is the abbreviation of visual interface, they are processing ASCII character data, skilled use of vim is absolutely your ability to become a Linux Daniel, the so-called Trinidad, a one way.
Below on my learning process some very commonly used in the more practical usage to do a summary
Vim Undo and redo operations
In non-editable mode, use U to undo the last action and use Ctrl+r to recover the last action.
Vim block selection and copy paste
Vim enters a file, Presses V, enters VISUAL mode, uses h,j,k,l or arrow keys to move the cursor to select the content, press Y to complete the copy, press p to complete the paste where you need to paste.
Press V to enter visual mode, press V again to exit visual mode. If you copy the content, you can also press I into edit mode for editing, and then ESC quits to use p to finish pasting.
Vim moves to the beginning and end
Beginning and end of document
GG: Command moves the cursor to the beginning of the document
G: Command moves the cursor to the end of the document
The beginning and end of a line
0 move to the beginning of a line
$ move to end of line
Vim page
Corresponds to the effect of page up and PAGE down.
Ctrl+f the whole screen forward
Ctrl+b a whole screen back
Ctrl+d the half screen forward
Ctrl+u Roll back half screen
Vim deletes one or more rows
DD Deletes a row
NDD deletes the n rows starting with the current line
Vim Copy Multiple lines
: 9,15 copy 16 or: 9,15 Co 16
This may include:
: 9,15 move 16 or: 9,15 m 16 moves the text from line 9th to line 15th to the back of line 16th
Summarize
Just write so much, these are the functions that can be used frequently. Vim's function is very powerful, first of all these commonly used simple foundation of the society, their own combination of the explanation slowly groping, basic these almost enough ordinary work. I hope this article can be for everyone's study or work to bring certain help.