Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Recording and playback of Vim commands

Shulou Source: shulou.com Published: 2022-06-03 04:27:44 09月11日 Update

The steps are as follows:

Q + (a.. z) register name

Do what you want to do.

Q end operation

Called as @ + register

Liezi is as follows:

When writing PHP programs, we often use to create functions.

Such as

Function add_in () {

}

Now let's record the command:

Qf f is the register name

Ifunction A () {o} >

Q end

How to use it:

Add_in@f

@ @ to repeat the last call

The register recorded by the command is the same thing as the register used for the yank and * * commands

Modify the contents of the register:

G to end of file

O generate a new line

"fp puts the contents of register f on this line, and what you see is the same as editing plain text.

If you get to the beginning of the line, you must not save.

"fy$ writes the correct result to register f

Dd * * draft

Tags: Registers commands contents methods normal things usage functions files text steps programs results drafts columns previous new lines generation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Apple Shulou Information MySQL Linux