Introduction and configuration of VIM

Source: Internet
Author: User

Vim is a very powerful editor, especially for the programmer population.

Switching efficiency is often not high in various editors, and various features are easily confused. Vim is a good choice if you are only allowed to pick an editor.

The direct decompression under Windows can be used.

The file is dragged up and edited directly: Wq Save and exit.

It differs from the general editor in that there are multiple modes. Be sure to figure out which mode you are in. 4 modes commonly used:

Normal mode, which is the mode when it is started by default, is not valid for input edits.

Insert edit mode, same as normal editor mode, allows you to enter content

Command mode, enter some commands in the bottom row small buffer, command many, very powerful

Visual visual mode for selecting certain text (you can press a line, you can press a block)

Wherever you go, press the ESC key, and you're back to Normal.

Normal---> Insert:

I insert before cursor, a after cursor insertion, a line end inserted, I first insert

o Create a new row after the current line is inserted, o the current line before the establishment ....

Normal---> Command:

With a colon (:)

Normal---> Visual:

V Visible, v block visual mode

To move the cursor in normal mode:

H J k L directional key

CTRL + F PAGE DOWN, CTRL + B page UP

CTRL + D flip half screen, CTRL + U flip Half screen

H cursor to top of screen, M Middle, L to screen bottom

GG to document header, G to end of document

0 to wardrobe, $ to line end, ^ to non-empty characters

W Next prefix, b on a prefix, e this ending or next ending, ge reverse ...

W B E is similar, but the word can contain the connection symbol

(to the head of the sentence) to the end of the sentence with punctuation as the basis

{To segment header,} to paragraph trailing paragraph with empty behavior according to

: number to this line number | To one of our characters

Bracket Matching:%

------------------------------------------------

Introduction and configuration of VIM

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.