Recording of VIM

Source: Internet
Author: User

I often press the "Q" key or something, and the annoying "Recording" is displayed in

Below the editor. Sometimes I am crazy when I want to exit the editor.

Today, I am free to study what the recording is...
It was used to record the buttons, and then we can use this record later.

How to use it?
In normal status (normal status =! Insert Status &&! Visual status), press Q, and then press a letter or number.

To identify the location where the record is saved. In this case, "Recording" is displayed under the editor, and then click Q (in

In normal state.

To sum up-
QX-> Start key record (in X cache ). (In normal status)
"Work" to be recorded"
Q-> end record. (In normal status)

Example-
To add "" to the beginning of the file and "" to the end of the file, you can

Run:

Qm11_ig $ AQ

Description-
QM-> Start record (stored in cache m)
1G-> to the first line of the file
0i-> Insert "" at the beginning of the first line, and then press "OK ".

Status.
G $-> to the last column of the last row of the file
A-> Add "" at the end of the file, and then press "return normal ".

.
Q-> end the record on the keyboard

Q: How do I use these keyboard hitting records?
A: Use the @ symbol to add the corresponding cache name (in normal state ). For example, if you want to use the above record

Simply enter @ M in the normal state.
---------------------
Sometimes there will be another window under vim, because when I want to exit the editor, I typed ": Q" into "Q :". No.

This is the history window of VIM commands. It is easy to exit the window. Press ENTER or enter ": Q ".

Yes.

Note:
The recording function of VIM is not intelligent. During recording, it records all your operations (including misoperations); During execution

It will also perform all your operations (including misoperations). When recording all the operations, you should make your button actions more intelligent.

".

If you have any questions:
: Help Q
: Help Q:

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.