Introduction to VIM for programmers

Source: Internet
Author: User

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 well (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 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 Middle Screen
L At the bottom of the screen
:XXG 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.