17th lesson The general mode of VIM tools

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.