One, vim tools
Vim is an upgraded version of VI, VIM with color display, divided into general mode, editing mode and command mode
1. Install Yum install-y vim-enhanced
2, Vim color display is based on the contents of the file display, its configuration file is:/ETC/VIMRC
3. Vim General mode move cursor
H move the cursor to the left
L or SPACEBAR to move cursor to the right
J Move Cursor Down
K Move Cursor up
The above keys are supported: Press a number key and press again, you can move several cursors by number
0 quickly move the cursor to the beginning of the line
Shift+4 quickly move the cursor to the end of the line
GG quickly moves the cursor to the beginning of the first line
G move the cursor quickly to the end of the last line
Ctrl+f Downward Turn screen
Ctrl+b Upward Flip Screen
4. Vim General mode copy, cut and paste
Single-line operation:
X cut one character to the right
X cut one character to the left
U restore one operation at a time, up to 50 times
DD Clipping line of cursor
YY the line where the cursor is copied
P paste to the same line as the cursor
Multi-line operation:
Number +yy copy multiple lines from cursor start
Ctrl+r Anti-recovery
V starts with a cursor character and is free to select the number of rows to copy, paste, delete
17th lesson The general mode of VIM tools