4 Modes of "Linux" vim switching __linux

Source: Internet
Author: User

1. Normal mode (Normal-mode)

The default is in normal mode when Vim is started. Regardless of the mode, press the <Esc> key (sometimes required to press two) to enter normal mode.


2. Insert mode (Insert-mode)

Pressing I, I, a, a, and so on in normal mode (detailed in the following series) will enter the insert mode.
Now just remember to press the I key to insert mode. In insert mode, the corresponding character is written when the keystroke is clicked

3. Command mode

In normal mode, press the: (colon) key to enter command mode. In command mode, you can perform
Some inputs and executes some of the instructions provided by VIM or plug-ins, just as in the shell. These directives include
Setting up the environment, file actions, invoking a feature, and so on.

Commonly used commands are: Q (exit), q! (Forced exit), W (save), Wq (Save and exit


4. Visual mode (visual)

The visual mode is simply to select an edit area and then perform some actions on it, such as delete, replace, change case, etc.

In normal mode press V (character text, character selection text), V (line text, line-by-row selection text), <CTRL>+V (block text, select text according to block), you can enter visual mode. In visual mode
The operation is a bit like taking the mouse to operate, the choice of text when there is a mouse to select the visual sense, sometimes very convenient.
D Delete selected text
C Modify selected text
R Replace selected text
I inserts before the selected text
A Insert after text is selected
Gu selected area to lowercase
GU selected area to uppercase
g~-Case Intermodulation
> Indent one unit to the right
< indent one unit to the left







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.