Vim Command Collection

Source: Internet
Author: User

1. Mode switch

Three modes: Command mode, input mode, bottom line mode

Switch between command mode and input mode: I ESC

Switch between command mode and bottom-line mode: SHIFT +: ESC

2. Insert

I: Insert on the left of the current character

I: Inserting at the beginning of the current line

A: Insert to the right of the current character

A: Insert at the end of the current line

o: Insert a new row below the current line

O: Insert a new row above the current line

H M L Jump to the top middle of the screen

W jumps to the beginning of the next word
e jumps to the end of the word
b Jump backward in Word units

GG jumps to the beginning of the file
G jump to end of file
10gg or 10G jumps to line 10th

Ta jumps to the next a front
FA jumps to the next an A

Besides PageUp PageDown, there are other quick keys in addition to reading files.
such as ctrl-f forward a page ctrl-b back one page

It's not important up there.
ctrl-d down half page ctrl-u up half page I think it's more practical. This way you don't jump when you look at an article.
In addition, there are
Ctrl-e Down Line
Ctrl-y Up line

3. Delete
x        Delete the characters under the current cursor
DW Deletes the remainder of the word after the cursor.
d$ the remaining portion of the line after the cursor is deleted.
DD deletes the current line.

the C function is the same as D, except that when the delete operation is complete, insert MODE
CC also deletes the current line and then enters insert MODE

Delete the first character of each line :%s/^.//g

Vim Command Collection

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.