Detailed explanation of the Vim commands in CentOS

Source: Internet
Author: User

Detailed explanation of the Vim commands in CentOS
This figure draws on the basic movement methods in vim. To facilitate programmer, it lists many buttons that can only be used by programming. In addition to this, there are actually some useful things that I did not expect to draw (such as tags, tabs without standard keys, man ..), if you have idea, you are welcome to provide it.
These icons are divided into the following types based on the unit size of movement, marked with different colors:
(Note: This is not a complete vim quick key list, but a commonly used key .)Character (character)

H

Left

J

Lower

K

Upper

L

RightWord)

W

Next word

W

Next word (skip punctuation)

B

Previous word

E

Jump to the end of the current wordLine)

0

Jump to the beginning of the current row

^

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

$

Jump to end of lineSection (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 (Refer applies to various brackets, and even HTML tags can be jumped if set)Screen, absolute position

H

Screen top

M

Screen Center

L

Screen bottom

:X

XG

Jump to row x (x is the row number)Search)

/Xxxx

Search 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 (word) where the current cursor is located (for programming purposes, jump to the place where the variable/function is defined)Split windows

: Split

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

: Diffsplit xxx

Compare windows with file xxx (diff)

Ctrl-W p

Jump to the previous split window (switch back in 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 rightAuto-completion (used in Insert Mode)

Ctrl-N

Automatically capture the next word in an archive)

Ctrl-P

Automatically capture the previous word in an archive)

Ctrl-X Ctrl-F

Automatic File capture

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.