Vim's most-used commands

Source: Internet
Author: User

Compilation Example: g++-o hello hello.cpp-std=c++11, where-std=c++11 represents support for c++111 new features

Command mode execution after ESC is pressed

A after inserting a letter

I insert the current cursor

-------------------------------------------

DD Delete When moving forward

YY copy when moving forward

-------------------------------------------

V Selection

D Cut

Y copy

P paste on top of current cursor

P paste below the current cursor

Shift+p pasting before the current line

-------------------------------------------

U undo Operation

Ctrl+r Repeat Operations

-------------------------------------------

^ Move to the first non-whitespace character of the bank

0 (number 0) moves to the first character of the Bank,

$ move to end of line

3$ move to the end of line 3 below

Ctrl+f Jump to next page

Ctrl+b Jump Previous Page

[[/gg File header

]]/g file Footer

-------------------------------------------

: Set NU Displays line number

: 100 Jump to 100 position

-------------------------------------------

: q! Do not save exit

: W Save

: X Save exit

-------------------------------------------

/xxx looking backwards for XXX

? xxx look up xxx

n continue to find the next

: Set Nohlsearch Close Highlight search display

------------------------------------------

:%S/ABC/123/GC replaces ABC with 123

Vim's most-used 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.