summaryrefslogtreecommitdiff
path: root/book/src/usage.md
diff options
context:
space:
mode:
authorGokul Soumya2021-08-18 00:53:50 +0000
committerGitHub2021-08-18 00:53:50 +0000
commitb59b2485613089595522377c87a392c859ee31a0 (patch)
tree385c1b0ad737af5df604a67aaf724acce1c74da6 /book/src/usage.md
parentfdd6530df7fa849b86e4fdd3c7d696d89aaf4012 (diff)
Add docs for registers, multi key remaps (#557)
Diffstat (limited to 'book/src/usage.md')
-rw-r--r--book/src/usage.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/book/src/usage.md b/book/src/usage.md
index 0458071a..9ee8634c 100644
--- a/book/src/usage.md
+++ b/book/src/usage.md
@@ -2,6 +2,28 @@
(Currently not fully documented, see the [keymappings](./keymap.md) list for more.)
+## Registers
+
+Vim-like registers can be used to yank and store text to be pasted later. Usage is similar, with `"` being used to select a register:
+
+- `"ay` - Yank the current selection to register `a`.
+- `"op` - Paste the text in register `o` after the selection.
+
+If there is a selected register before invoking a change or delete command, the selection will be stored in the register and the action will be carried out:
+
+- `"hc` - Store the selection in register `h` and then change it (delete and enter insert mode).
+- `"md` - Store the selection in register `m` and delete it.
+
+### Special Registers
+
+| Register character | Contains |
+| --- | --- |
+| `/` | Last search |
+| `:` | Last executed command |
+| `"` | Last yanked text |
+
+> There is no special register for copying to system clipboard, instead special commands and keybindings are provided. See the [keymap](keymap.md#space-mode) for the specifics.
+
## Surround
Functionality similar to [vim-surround](https://github.com/tpope/vim-surround) is built into