Common vi shortcut keys

Source: Internet
Author: User

Ctrl + f move one page down ctrl + B move one page up 0 start with the current line $ search down the first line/word of the last line of the G file at the end of the current line? Word lookup n repeat the previous lookup operation N to the opposite of n. For example, after entering/word, follow N to look up: 100,200 s/no/yes/g directly searches for rows from 100 to 200, and replaces no with yes: 100,200 s/no/yes/gc for rows from 100 to 200, replace "no" with "yes". When you Replace "x", the system prompts the user to delete a character X "Forward" and delete a character dd "Forward". Delete the row where the cursor is located. ndd: delete multiple uplinks, for example, 20dd, delete 20 rows of yy copy the row of the cursor nyy copy the n rows of the cursor p paste a row of P paste a row of u undo, restore the last operation. repeat the previous operation. I insert a at the current cursor. Insert the next character in the cursor. Insert the last character in the current row. insert o in the next line. Insert the r replacement mode in the previous line, only the character where the cursor is located will be replaced by the R replacement mode once, and the w file where the cursor is located will be replaced all the time. Save wq and exit wq! Force save and exit q! Do not save exit set nu display row number set nonu close row number


This article from the "Liu yalei" blog, please be sure to keep this source http://liuyalei.blog.51cto.com/7767729/1300103

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.