diff --git a/docs/neovim-basics/registers.md b/docs/neovim-basics/registers.md index ef45a991..502c39f0 100644 --- a/docs/neovim-basics/registers.md +++ b/docs/neovim-basics/registers.md @@ -8,7 +8,6 @@ The name of a register is a number, alphabetical or special character. `SPC f r` lists the values of registers in a telescope popup - !!! EXAMPLE "Yank and paste commit message" Select the text of the commit message @@ -18,8 +17,33 @@ The name of a register is a number, alphabetical or special character. ++double-quote++ ++"m"++ ++"p"++ pastes the register text into the commit message buffer -## Special Registers +## Registers + +!!! INFO "Neovim help - registers" + ```shell + :help registers + ``` + +++double-quote++ the unnamed register, used by Neovim normal commands, e.g. `c` `d` `p` `s` `x` `y`, etc. + +++0++ to ++9++ numbered registers containing yank and delete history + +++minus++ small delete register for text smaller than a line + +++"a"++ to ++"z"++ named registers manually selected, ++"A"++ to ++"Z"++ to append to the text already in the register + +++colon++ ++period++ and ++"%"++ read-only registers use with put commands (last inserted, current file name, recent command) + +++"#"++ alternate buffer file name + +++equal++ expression register for the result of runing a Neovim command expression + +++plus++ and ++"*"++ selection registers for GUI + +++underscore++ black hole register does not store text, use when normal commands shouldnt update other registers + +++slash++ last search pattern register used ## Find Registers @@ -28,3 +52,7 @@ The name of a register is a number, alphabetical or special character. ![AstroNvim Find Registers - telescope view](https://github.com/practicalli/graphic-design/blob/live/editors/neovim/screenshots/neovim-find-registers-telescope-popup-light.png?raw=true#only-light){loading=lazy} ![AstroNvim Find Registers - telescope view](https://github.com/practicalli/graphic-design/blob/live/editors/neovim/screenshots/neovim-find-registers-telescope-popup-dark.png?raw=true#only-dark){loading=lazy} + + +!!! HINT "Registers in insert mode" + `C-r` in insert mode pastes the content of the given register, e.g. `C-r a` to paste the content of `"a`