Vim practice manual (2) frequently used status switch buttons

Source: Internet
Author: User
Tags uppercase letter

Reprinted please indicate this blog from "LIU Da csdn blog": http://blog.csdn.net/poechant

1. Normal Mode-> insert mode

I
Lowercase letter I, insert at the cursor position

A
Lowercase letter A, insert at the next position of the cursor

I
Uppercase letter I, insert at the first non-space position in the row where the cursor is located

A
Uppercase letter A, inserted at the last character in the row where the cursor is located

O
Lowercase letter O, insert a new line at the next line of the row where the cursor is located

O
Uppercase letter O, insert a new line at the top of the row where the cursor is located

R
Lowercase letter R, replace the character at the cursor once

R
The uppercase letter R is used to replace the character at the cursor until you Press ESC.

2. Normal Mode-> command-line mode

: W
Save files

: W!
Force save files (provided that you have the permission to modify files)

: Q
Exit the Buffer Zone

: Q!
Force exit the buffer without saving

: WQ
Save the file and exit the buffer.

: WQ!
Force save the file and exit the buffer (provided that you have the permission to modify the File Access)

: W <FILENAME>
Save as file named filename

: N1, N2 W <FILENAME>
Save the data from line N1 to line N2 as the filename file.


If the file is changed, save the file and exit. Otherwise, exit directly.

3. insert mode-> normal mode

Press ESC

4. command-line-> normal mode

Press ESC

Reprinted please indicate this blog from "LIU Da csdn blog": http://blog.csdn.net/poechant

-

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.