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

nx.reg

nx.reg.recording()

No documentation comment in the prelude.

Defined in state.lua.

nx.reg.executing()

No documentation comment in the prelude.

Defined in state.lua.

nx.reg.set(name, value, options)

nx.reg.set(name, value [, options]) [alias vim.fn.setreg]: write a register. name “” / “@” means the unnamed register ". value is a string (charwise) or a list of strings (one per line, linewise). options is a string of flags: c/v charwise, l/V linewise, a/A append; b / <C-v> (blockwise) is rejected (no visual-block mode yet). An uppercase register name also appends. A string ending in a newline is linewise when no type flag forces otherwise. Returns 0 on success (1 is vim’s failure code, but the failure cases here raise instead). The write is queued for the server (nx._set_reg) and write-through the mirror so a getreg later in the same chunk is consistent.

Defined in state.lua.

nx.reg.get(name)

nx.reg.get(name [, …]) [alias vim.fn.getreg]: the text stored in register name (“” / “@” / nil = the unnamed register), or “” when the register is empty / unset. Reads the nx._registers mirror the server refreshes before this chunk; an uppercase name reads its lowercase store, matching vim.

Defined in state.lua.

nx.reg.gettype(name)

nx.reg.gettype(name) [alias vim.fn.getregtype]: “v” (charwise), “V” (linewise), or “” for an unknown register. An empty / unset (but valid) register is charwise -> “v”, matching vim. Blockwise (“<C-v>{width}”) waits on visual-block mode.

Defined in state.lua.