Vim Recall繁體中文

Replay macro a

@a

Example

Normal 0 / 1
one
two
three
four
five
six
Cursor on line 1, column 1

Execute the commands stored in register a.

Vim registers

a Register a
CharacterwiseA!<Esc>j
· space ⇥ tab ↵ line break

Macro

Recording register
None
Executing register
None
Before & after
Before
one
two
three
four
five
six
Cursor on line 1, column 1

Vim registers

a Register a
CharacterwiseA!<Esc>j
· space ⇥ tab ↵ line break

Macro

Recording register
None
Executing register
None
After
one!
two
three
four
five
six
Cursor on line 2, column 3

Vim registers

a Register a
CharacterwiseA!<Esc>j
· space ⇥ tab ↵ line break

Macro

Recording register
None
Executing register
None

Start in Normal mode. Register a contains A! followed by Esc and j: append !, then move down one line.

Details & Vim help

Example replayed in Vim

Execute the commands stored in register a.

@a reads register a as commands. Before replaying, position the cursor where the recording expects to begin. Errors can interrupt a macro.