Shortcuts for VIM Learning (1)

Source: Internet
Author: User

Since VIM has been used for a long time, it has never been thought of as convenient and fast as VIM.

I thought for a moment, probably because I have always been dependent on the VIM editing mode.

This is no different from using other simple editors.

The efficiency advantage cannot be reflected.


So I summarized some common shortcut keys.


To better achieve the Training Effect

You cannot learn too many shortcuts every day. Otherwise, you will not be able to absorb and digest them.

It can also bring people into frustration and dispel their enthusiasm for learning.

So I plan to learn up to ten shortcuts

Learn the next set of shortcuts after you are familiar with them.



Now let's start learning the first group of Simple Shortcuts.

Today, we summarize the mobile shortcut keys.


I. direction keys

K

H l

J


This figure shows the direction keys in command mode.

I was wondering at the beginning about JK's position. Why is it not represented by J?

What about K? This is suitable for people's thinking.

After using it for a while, I found that there is a reason for this.

Because most of the time we edit the text, we move it down.

Our index finger is more flexible than the middle finger, so this is in line with the ergonomics principle.


In addition, if you press a number before each key in jkhl, it means to move n times *.

For example, 10j indicates moving 10 rows down


Ii. home end key


In command mode

Home = 0

End = $

Convenient


3. Page flip shortcut


Flip the entire page

Crtl + f indicates turning down

Crtl + B Indicates turning up the page


The record-writing method is also simple. f Represents forward, and B Represents back.

It's also natural to remember.


There are also shortcut keys for half pages

Crtl + d flip down half page

Crtl + u flip up half page


METHOD d indicates down, and u indicates up

Remember.


4. Quickly jump to a specified row

G. Jump to the last line of the document.

NG jumps to line n of the document

Gg = G1 jump to the first line of the document


Well, I learned from the greedy and chewy lessons. This time I learned so much about the shortcut keys.

The rest of the content will be carried out after this skillful grasp.




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.