1.2 VIM general Mode cursor movement

Source: Internet
Author: User

#进来就是一般模式

vi/etc/passwd

#一般模式快捷键

GG moves to the first line

G move to Tail line

Exercises:

1. How do I quickly move to the last line of a text file in Vim general mode?

Press the G key

2. Vim General mode, the cursor at the beginning of the line, how to move the cursor at the current position to the right 10 characters fast (assuming we have more than 10 characters?).

Press the number 10 first and then press space

Press the Number 10 first and press the L key

3. How do I quickly navigate to line 30th in Vim General mode?

30G

Summarize:

Main: Vim Open file is to enter the general mode, shortcut keys and less

Minor: GG moves to the first line, G moves to the tail line


Practice the Truth

Client putty, Xshell connection to vim in Linux keypad problem

When using VI on the putty, when opening numlock, press the numeric key on the keypad and not enter a number, but a letter and then newline (in fact, the command mode corresponds to the upper and lower keys).

Workaround

Option Terminal->features, find disable application keypad mode, select on it.

The Xshell in Xmanager 4 also has a small keyboard problem resolution of

Modify session Properties--terminal->VT mode--Initial numeric keypad mode

Select Set as normal.


1.2 VIM general Mode cursor movement

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.