Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

btv.macro

btv.macro.recording()

btv.macro.recording() [alias vim.fn.reg_recording]: the name of the register a macro is being recorded into right now, or nil when nothing is recording. The vim.fn alias returns "" instead of nil, matching vim.

Defined in state.lua.

btv.macro.executing()

btv.macro.executing() [alias vim.fn.reg_executing]: the name of the register whose macro is playing back right now, or nil when none is. Useful to skip work that only matters to a human watching — a plugin can cheaply no-op while a long 100<F3>a runs. Nested playback reports the INNERMOST register.

Defined in state.lua.

btv.macro.play(name, count)

btv.macro.play(name [, count]): play register name back as keys, count times (default 1) — the <F3>{name} command from Lua. The keys are queued and run after the current chunk settles, like any other key feed; the call returns immediately.

Defined in state.lua.