Document default registers

This commit is contained in:
Maxime Coste 2015-11-10 20:30:27 +00:00
parent 9134066e85
commit a0bcdd83df
2 changed files with 16 additions and 1 deletions

View File

@ -851,6 +851,16 @@ contain some special data:
* `.`: current selection contents * `.`: current selection contents
* `#`: selection indices (first selection has 1, second has 2, ...) * `#`: selection indices (first selection has 1, second has 2, ...)
Default registers
^^^^^^^^^^^^^^^^^
Most commands using a register default to a specific one if not specified:
* `"`: default yank, used by yanking and pasting commands like `y`, `p` and `R`
* `/`: default search register, used by regex based commands like `s`, `*` or `/`
* `@`: default macro register, used by `q` and `Q`
* `^`: default mark register, used by `z` and `Z`
Macros Macros
~~~~~~ ~~~~~~

View File

@ -149,7 +149,12 @@ constexpr StringView register_doc =
"Special registers:\n" "Special registers:\n"
" * %: buffer name\n" " * %: buffer name\n"
" * .: selection contents\n" " * .: selection contents\n"
" * #: selection index\n"; " * #: selection index\n"
" * [0-9]: selections capture group\n"
" * \": default yank/paste register\n"
" * @: default macro register\n"
" * /: default search register\n"
" * ^: default mark register\n";
class Normal : public InputMode class Normal : public InputMode
{ {