
美食网站,wordpress漂亮轮播代码,莱芜梆子网站,网站机房建设流程This post extracts some knowledge from Chapter 11 -- Macros.[!TIP]
Record and Execute a MacroThe q key functions both as the “record” button and the “stop” button. To begin recording our keystrokes…
This post extracts some knowledge from Chapter 11 -- Macros.[!TIP]
Record and Execute a MacroThe q key functions both as the “record” button and the “stop” button. To begin recording our keystrokes, we type q{register}, giving the address of the register where we want to save the macros.
The @{register} command executes the contents of the specified register. We can also use @@, which repeats the macro that was invoked most recently.[!TIP]
Normalize, Strike, AbortThe golden rule is this: when recording a macro, ensure that every command is repeatable.[!TIP]
Play Back with a Count22 is a good number.[!TIP]
Repeat a Change on Contiguous Lines~ toggle character case.[!TIP]
Append Commands to a MacroqA qB to append commands to the end of Macro.[!TIP]
Act Upon a Collection of Files:argdo normal @a
Execute the marco in all of the buffers in the argument list.[!TIP]
Evaluate an Iterator to Number Items in a List:let i = 1
qa
IC-r=iCR)
Esc
:let i += 1
q[!TIP]
Edit the Contents of a MacroWe can edit the macro as plain text by pasting it into the document and back to the register.原文链接:https://zhuang.dev/reading/practical-vim/11-macros/