Use the shortcut key of linux vim to move the cursor.

Source: Internet
Author: User

Use the shortcut key of linux vim to move the cursor.

Move cursor

H or left arrow: The cursor moves a character to the left, and the numbers and letters are used together. 5 h indicates that 5 characters are moved to the left, and so on.

J or right arrow: move the cursor down a character

K or Up Arrow: move the cursor up to a character

L or Down Arrow: move the cursor one character to the right


Ctrl + f: move the cursor down a page

Ctrl + B: move the cursor up one page

Ctrl + d: move the cursor down half page

Ctrl + u: move the cursor up half page


+: Move the cursor to the next line without spaces

-: Move the cursor to the previous line without spaces


N <space>: n indicates a number. For example, press "10" and then press the space key. The cursor will move the 10 characters in the row to the right.(Common)

0 or home key: move the cursor to the beginning of the line(Common)

$ Or end key: move the cursor to the end of the line(Common)


G: Move to the last row of the file (Common)

NG: n indicates a number, for example, 10G. move the cursor to the 10th line of the file (Common)

Gg: move the cursor to the first line of the file.(Common)

N + enter key: move the cursor down n rows. For example, press 10 first and press enter to move the cursor down 10 rows.(Common)



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.