Vim command Accumulation

Source: Internet
Author: User

Vim command
YY: The line where the cursor is copied
4YY: 4 rows starting at the beginning of the row where the copy is located

P: Paste
DD: The line where the cursor is clipped
2DD: Cut cursor line down 2 lines
DW: Cut a word

D: The contents of the current line after the cursor
X: Delete the current character backwards
X: Delete Current character forward
U: Undo
Ctrl+r: Anti-revocation
R: replace one character
R: Replace


H left J down k up L right

H: Top of current screen
M: middle of current screen
L: Below the current screen

Ctrl+f: Turn down one page of code
Ctrl+b: Turn up one page of code
Ctrl+d: Turn down half-page code
Ctrl+u: Turn up half-page code

20G: Quickly navigate to the 20th line of code
G: Quickly return to the last line of the entire code
GG: Fast back to the beginning of the entire code

W: Pick the length of a word backwards,
B: Pick the length of a word forward,


Select a piece of code
V: view mode cursor position HJKL
V: View mode cursor Line HJKL
.: Repeat the previous command

: Replace in colon mode
%s/a/b/g
Change a All to B

Vim command Accumulation

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.