Recently attended a friend's wedding. Far away, without taking the computer. So it hasn't been updated. Very ashamed, starting from today to formally update the study content.
First, VIM
Vim is the upgrade version of VI, the biggest difference is that when editing a text, vi will not display color, VIM will show the color.
Yum install-y vim-enhanced installation vim
Ii. 3 common models of VIM
General mode
-
H or left arrow The cursor moves one character to the left
-
L or the UP Arrow cursor moves right one character
-
K or up ARROW key &NBS P Cursor moves up one character
-
J or downward arrow cursor moves down one character
-
C Trl+f or pagwup screen move forward one page
-
Ctrl+b or pagwdown &NB Sp Screen moves back one page
-
Number 0 or shift+6 move to the beginning of the line
-
Shift+4 &n Bsp move to line end
-
GG &NBS P move to first line
-
G move to tail line
-
NG (n is any number) move to Nth line
String copy, delete, paste, etc. operations such as
X,x x means to delete one character backwards and X to delete one character forward
NX removes n characters backwards
DD Delete/clip cursor on the same line
NDD Delete/clip n rows after the row of the cursor
YY Copy the cursor on the same line
P (lowercase) from the line where the cursor is located, paste the contents that have been copied or pasted down
P (uppercase) from the line where the cursor is located, paste up has been copied or pasted
Nyy starts at the line where the cursor is located, copying the n rows down
U Restore previous action
V moves the cursor after V to select the specified character, then copy, paste, and so on
Linux Learning Notes (17)