Common command shortcuts for VIM tools

Source: Internet
Author: User

First, the movement of the cursor
0: Move to the beginning of the line.
$: Moves to the end of the line.
W:walk move to the next word
B:back move to the previous word
H or BACKSPACE: Move left one character; back
L or Space: move right one character; forward
J: Move down one line;
K: Move up one line;

Second, turn the screen
Ctrl+f: Turn down one screen.
Ctrl+b: Turn up one screen.
Ctrl+d: Flip half screen.
Ctrl+u: Flip half screen.
Ctrl+e: Scrolls down one line.
Ctrl+y: Scrolls up one line.

Three, basic insertion
I: Insert in front of the cursor; a tip: Press 30i in ESC mode first;
Enter W again, then press ESC, and insert 30 watts.
I: The first non-empty word match either inserted in the current line;
GI: Inserted in the first column of the current row;
A: Insert after the cursor;
A: Insert at the end of the current line;
o: Insert a new line below;
O: Insert a new row above;
Iv. Copy, paste
Y: Copies the selected text in Visual mode.
yy or Y: Copies the entire line of text.
y$: Copies the cursor from its current position to the end of the line.
Y0: Copies the cursor from its current position to the beginning of the line.

P: Paste after the cursor.

D: Delete (cut) the selected text in Visual mode.
d$ or D: Deletes (cuts) the contents of the current position to the end of the line.
D0: Delete (cut) the contents of the current position to the beginning of the line

Five, find
/something: Find something in the text that follows.
Something: Look for something in the previous text.

Common command shortcuts for 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.