Introduction to VIM

Source: Internet
Author: User

12-09 update: The English version of VIM visual cheat sheet is also available. PNG, PDF)

(Update:Add the basic instruction table and description in the graph andPDFTo facilitate printing and pasting on the wall at any time.)

I was writing that article.Articles about VI and Text EditorTo attachVimThe super simple entry link, but I was not very satisfied with it, so I decided to first draw a description for the entry.



PDF download

This graphVimBasically all the moving methods have been drawn up, for convenienceProgrammerIn particular, it lists a lot of buttons that can only be used to write a program. In addition to this, there are actually some useful things that I did not expect to draw.(LikeTags, No standard shortcutTab,Man ..)If you haveIdeaWelcome.

These icons are divided into the following types based on the unit size of movement, marked with different colors:
(Note that this is not completeVimThe quick key list is just a commonly used key .)

Character (character)

H

Left

J

Lower

K

Upper

L

Right

Word)

W

Next word

W

Next word (skip punctuation)

B

Previous word

E

Jump to the end of the current word

Line)

0

Jump to the beginning of the current row

^

Jump to the first non-blank character in the current line

$

Jump to end of line

Section (paragraph), block (Block)

{

Previous section (separated by blank lines)

}

Next section (separated by blank lines)

[{

Jump to the beginning of the current block

]}

Jump to the end of the current block

%

Jump to the brackets corresponding to the current one (applies to various parentheses, and can even jump to HTML tags if set)

Screen and absolute position

H

Screen top

M

Center of Screen

L

Bottom of Screen

:X

XG

Jump to row x (x is the row number)

Search)

/Xxxx

Search for xxxx

#

Search for the word of the current cursor)

*

Search for the word of the current cursor)

FX

Search for character X from the current row

GD

Jump to the definition location of the word in which the current cursor is located (for programming purposes, jump to the definition variable/Function Location)

Split windows

: Split

Split Window (you can add a file name to enable another file)

: Diffsplit xxx

Compare the split window with file XXX (diff)

CTRL-W P

Jump to the previous split window (switch back and forth between the two split Windows)

CTRL-W J

Jump to the split window below

CTRL-W H

Jump to the left split window

CTRL-W K

Jump to the split window above

CTRL-W L

Jump to the split window on the right

Auto-completion (used in insert mode)

CTRL-n

Automatically fills in the next word in the file)

CTRL-P

Automatically fills in the previous word in the file)

CTRL-x Ctrl-F

Automatic File Filling

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.