Vim Command (i)

Source: Internet
Author: User

VI command

YY the line where the cursor is copied

P Paste behind the cursor

DD Delete the line where the cursor is located

Vim-p 1.c 2.c 3.c Open multiple files

J+t for file switching

WA: Save All

QA: Exit All

/+ the string to look up:/printf means to look down and then press N to find the next

? + to find the string up find press N

: + line number: 700 reach that line

: $ jump to last line

: S/hello/word: Turn 22 lines of Hello into Word

: s/hello/wprd/g: Replace all 22 lines of Hello with Word

: 18,22 S/hello/word: Replace the first hello of each row in rows 18 through 22 with the word:0,$ representation of the full text

Vim Command (i)

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.