Vim Edit Command

Source: Internet
Author: User
Create a modified file with vim
Vim Text Editor
Format vim [[/directory/] file name]

Three different modes
Command mode
Input mode (insert mode) input content
Last-line mode save and exit
To hit the corresponding command in the appropriate mode
Command mode press I into input mode (press ESC to return to command mode) press: From command mode to last line mode (press ESC to return to command mode) cannot enter last line mode from input mode
In command mode yy copy the current line p paste (3yy copy from the line where the cursor is three lines)
DD Cut/delete current line P paste (3DD cut or delete cursor after three lines)
U returns the position of the previous operation U
Shift+z Z =wq
Input mode Press "End" key to move cursor to end of line
Press "Home" button in input mode to move the cursor to the beginning of the line
Down PAGE Down
Up PAGE Up

In the last line mode, enter:
Set NU Display line number
Wq Save and exit
X Save and exit
Do not save exit q!
Attention
Create a new file if the file does not exist
Enter Command mode if the file already exists
Vim only the ability to create a text file does not have the ability to create a directory

Vim Edit Command

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.