Neovim 101 - Macros and Registers
In this article, we will learn the basics of macros and registers, Lua APIs to manipulate registers, and plugins to help us manage macros and registers.
This article is part of the Neovim 101 series.
The Neovim configuration files are available in this repository.
Getting Started
Let’s get started with the basics.
Registers
There are 10 types of registers (:h registers
).
- The unnamed register
“
- 10 numbered registers
0
to9
- The small delete register
-
- 26 named registers
a
toz
orA
toZ
- 3 read-only registers :
,
,.
and%
- Alternate buffer register
#
- The expression register
=
- The selection registers
*
and+
- The black hole register
_
- Last search pattern register
/
We can use the :registers
command to display the type and contents of all numbered and named registers.