VIM Basic Operation command

Source: Internet
Author: User

Vim is the most common text editor on Linux systems, and almost any Linux distribution will be installed by default. Yes, it's a free software. It's good to learn the basic operation commands of the Vim editor, which can make your work more effective and make you more handsome.

Three modes are set in the VIM Editor---------Command mode, edit mode, and last line mode.

    • Command mode: Control the cursor movement, can copy, paste, delete and find the text and other work
    • Edit mode: Normal text entry
    • Last-line mode: Save or exit the document, and set the editing environment

The VIM editor enters the command mode by default, and you need to switch to edit mode before you write the document, and each time you finish writing the document, you need to return to the command mode before entering the last line mode to save or exit the document.
Special note: In the VIM editor, you cannot switch directly from edit mode to last-line mode.

In command mode, you can switch from command mode to edit mode using a, I, o three keys, respectively:
1) A: Insert after the current cursor position
2) A: Insert at the end of the line at which the cursor is currently located
3) I: Insert before the current cursor position
4) I: Insert at the beginning of the current cursor
5) O: Insert the next line in the current line of the cursor (add a row)
6) O: Insert the previous line of the cursor in the current row (add a row)

Commands commonly used in command mode

The last-line mode is primarily used to save or exit files, as well as to set the working environment of the Vim editor, and allows the user to execute external linux commands or jump to a specific number of lines in the document being written. To switch to the last line mode, enter a colon in the command mode: Yes.

Commands commonly used in last-line mode

Well, today is a simple introduction to the basic operation of the command, more quick commands waiting for you to learn to explore.

VIM Basic Operation 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.