Create and use macros in Vim.
From Neovim documentation (https://neovim.io/doc/user/usr_10/):
1. The "q{register}" command starts recording keystrokes into the register named {register}. The register name must be between a and z.
2. Type your commands.
3. To finish recording, press q (without any extra character).
# Chapters
00:00 Purpose
00:06 Example Context
00:38 Manual Editing
01:13 Recording
01:45 Replaying