Vim Practical Tips 1

Source: Internet
Author: User

    1. CW deletes the text from the cursor position to the end of the current word and switches to insert mode.
    2. DW deletes the text from the cursor position to the end of the current word and moves to the first letter of the next word.

Repeatable operations and how to rewind

Purpose                                  Operation                 Repeat Fallback

Make a change to {edit} . u

Finds the next specified character in a row F{char}/t{char} ;                      ,

Finds the previous specified character F{char}/t{char} in a row ;                    ,

Find the next occurrence in a document/pattern n N

Find the previous match in the document? Pattern n N

Perform replacement: S/target/replacement & u

:%s/target/replacement (Find all and replace All)

(All modifications from entering the insert mode to leaving are a modification)

H cursor moves one character to the left

J Cursor moves to the next line

K cursor moves to the previous line

l (Small Letter of L) cursor moves one character to the right

$ cursor moves to end of line

^ cursor moves to the beginning of the line

A inserts the contents after the current cursor

I insert content before the current cursor

Compound Command                    equivalent long command function

C $ Delete all the current cursor to the end of the line and enter insert mode

s cl deletes the current cursor content and enters insert mode

S ^c Delete the current entire line and enter insert mode

I (Capital letter i) ^i moves to the beginning of the line and inserts the contents before the current cursor

A $a moves to the end of the line and inserts content after the current cursor

o a<enter> insert a blank line below the current line to add content

O ko inserts a blank line above the current line add content

Vim Practical Tips 1

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.