Pages of VIM tips

Source: Internet
Author: User

H left, backspace, or direction key
J, enter or + (shift key required), or direction key
K, or direction key or-(shift is not required)
L right, or space or direction key
The hjkl key is used to move your hands away from the typing area (in the center of the keyboard) to speed up typing. If you are not used to it, use the arrow key!
The backspace and space are moved at the beginning or end of the row, but the direction key or HL key is moved at the beginning or end of the row. The newline feature is an extended Vim feature, which is not available in Elvis.
JK and move the cursor up and down using the direction keys to keep the cursor in the same column as much as possible. Use enter, +,-to move up and down, the cursor will move to the first non-blank character in the upper (lower) line.
It seems a little complicated. Now you can use the direction keys to move them! After you fall in love with vim, pay attention to it.
CTRL-F: Pagedown.
Crtl-B is Pageup.

 

advanced cursor movement
0 indicates a number of characters 0 rather than an English letter O. Or hmoe key, move to the beginning of the line,
(including blank characters ).
^ move to the first non-blank character. Note that shift is required.
$ move to the end of the row or end key. Shift key.
the preceding two buttons are derived from the regular expression. In Regexp, ^ is the beginning of the matched row and $ is the end of the matched row.
move G to the end of the file (the first non-blank character in the last line)
move Gg to the beginning of the file (the first non-blank character in the first line)
GG is an extension of VIM. You can use 1g in Elvis or the original VI to move it to the beginning of the file (the number 1 is not an English text L ).
G is originally intended to be Goto. It refers to move to the beginning of a specified number of rows. If no number is specified, it is the last row by default.
W is moved to the beginning of a word. Of course, it refers to an English word.
W is the same as above, but some punctuation marks are ignored.
move e to the end of the previous word.
E is the same as above, but some punctuation marks are ignored.
B is moved to the beginning of the previous word.
B is the same as above, but some punctuation marks are ignored.
move H to the first non-blank character on the screen.
move m to the first non-blank character in the middle of the screen.
l move to the first non-blank character at the bottom of the screen.
This is different from Pagedown and Pageup. The internal content is not dynamic, but the cursor is moving.
N | move to the nth character (column. Note: Use the Shift key. N is calculated from the beginning
.
: Move n to the beginning of line N. Or ng.

Special Movement
) To the beginning of the next sentence (sentence.
(Move to the beginning of the previous sentence (sentence.
} Move to the beginning of the next section (paragraph.
{Move to the beginning of the previous paragraph (paragraph.
Sentence is .! ? It is a partition.
Paragraph is a blank behavior partition.
% This is used for matching {}, [], (). For example, your cursor is now on {
As long as you press %, it will run to the matched. It is easy to use when writing a program.
 

There are also some special Vim buttons, but you have to wait till the end to talk about them. Otherwise, you may be dizzy.

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.