1. Vim
Generation: For Linux file editing, originally VI, and then for its function expansion, created VIM
Installation of Vim
Yum Install vim
2. Movement of the cursor
The most used is the direction key on the top and bottom around, and home, end key
And the HJKL on the letter keys.
H: Means forward
J: Indicates downward
K: Indicates upward
L: Indicates backward
W and E: The cursor moves backwards in the form of a single word
B: the cursor will move forward in the form of a single word.
GG : Press two lower case GG at the same time, the cursor will move to the first line
GG: At the same time press two to the big set GG, the cursor will move to the last line
Press the colon: then enter a number after the colon , and then enter, and the cursor will go to the beginning of the specified number of lines.
3.VIM Copy and paste
A. Copy the selected:
move the cursor to the text you want to select before or after, and then click the v key
Move the cursor again, if you want to copy it, click the Y key , if you want to cut, press the D key
Then, move the cursor to where you want to paste it, and press the P key.
Case:
Press v to select , and then press Y to copy
Move the cursor to the place you want to paste, press P
After pressing V, the move cursor is selected,
Then press D to cut
Then, move to the cursor to the place you want to paste press p
Above is a single copy or cut
Copy or cut in rows
1 line, is to move the cursor to the current line, and then, by yy is copied, press DD, is cut, and then move the cursor
To where you want to paste, press p
n rows, which is Nyy or NDD p
Here is the n line from the cursor down.
The above is Vim's mobile copy cut paste.
Vim Introduction Install copy cut paste