VIM Basic operation

Source: Internet
Author: User

Work needs to use VIM for a long time, has been stupid with the mouse point, a good way, today on the Internet to write the basic use of VIM command, for later query use:

Switch to Input mode:

Key Function
I Enter text to the left of the cursor
I Enter text at the beginning of the current line
A Enter text to the right of the cursor
A Enter text at the end of the line at the current line
O Adds a blank line to the next line in the current row, with the cursor at the beginning of the new line
O Adds a blank line to the top row of the current row, with the cursor at the beginning of the new line

Text modification, non-edit mode:

Key Function
X Deletes the specified character at the cursor position
Dd Delete the line where the cursor is located
U Undo Recent Changes
U Undo all changes made to the current line
R Replaces one character at the cursor position
R Replaces the character that starts at the cursor position and changes to insert mode

To move the cursor command:

O Moves the cursor to the beginning of the current line
$ Moves the cursor to the end of the current line
W Move the cursor one word to the right to the beginning of the next word
B Move the cursor one word to the left to the beginning of the previous word
E Move the cursor to the end of the word

Search command:

Key Function
/ Search forward to the specified string, and then press N to search for the next
? Search backwards for the specified string, search to press N to find the next

VIM Basic operation

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.