VIM basic Commands

Source: Internet
Author: User
One, move the cursor # hjkl# 2w forward two words # 3e move forward to the end of the 3rd Word # 0 Move to the beginning of the line # $ The end of the current row # GG file The first line # G file last line # line number +g Specify line # <ctrl>+o jump back to the previous position # & Lt;ctrl>+i return to the position before the jump two, exit # <esc> Enter normal mode #: q! Do not save exit #: Wq save after exiting three, delete # x Delete current character # DW Delete to current word end # de Delete to current word end, including current character # d$ Delete to current line end # DD Delete whole line # 2DD Delete two lines four, modify # i insert text # A Current line End Add # R replaces the current character # O opens a new line and enters insert mode five, Undo # u Undo # <ctrl>+r Cancel undo six, copy paste # V into visual Mode # y copy # p paste # yy copy current line # DD cut current line seven, find #/forward lookup (n : Continue to find, N: Continue looking in the opposite direction) #? Reverse Lookup #% find paired {, [, (#: Set IC ignores case #: Set noic suppress Case #: Set HLS match Highlight #: Set is display partial match eight, replace #: S/old/new Replace the line with the first matching string #: S/ol d/new/g Replace full line matching string #:%s/old/new/g replaces the entire file's matching string

VIM basic Commands

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.