Vim Common commands/shortcut key summary

Source: Internet
Author: User

Nj/k/h/l


[Crtl] + f


[Ctrl] + B

0/Home

$/End

G

NG

Gg


N [Enter]



/Word



N

To continue searching for the next string named word.

N


: N1, n2s/word1/word2/g

For example: 1,100 s/man/MAN/g, search for man between 1 and 100 and replace it with MAN.

: 1, $/word1/word2/g


: 1, $/word1/word2/gc

Confirm the prompt characters and confirm whether to replace them.


X/X

Nx

Dd

Delete the line of the cursor

Ndd

Yy

Copy the row where the cursor is located

Nyy

P, P



U

[Ctrl] + r

. (Decimal point)



I/I


A/

Start to insert characters

O/O

Insert a new row

R/R

[Esc] till now

[Esc]



: W


: W!

: Q

: Q!

: Wq

ZZ



: Set nu

: Set nonu

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.