diff --git a/docs/reference/modal-editing/speaking-vim.md b/docs/reference/modal-editing/speaking-vim.md index 896fc585..daf4d98e 100644 --- a/docs/reference/modal-editing/speaking-vim.md +++ b/docs/reference/modal-editing/speaking-vim.md @@ -2,15 +2,33 @@ Neovim is easier to learn and gain much more benefit from if you learn to speak commands as sentences. -First learn some verbs: +The structure of the language takes one of the forms: + + +!!! TIP "keys are mnemonic or regex" + keys were designed to be mnemonic where possible, e.g. ++"d"++ for delete and ++"c"++ for change + + Common regular expression scopes are used, e.g. ++0++ first character, ++dollar++ last character + +## Actions + +First learn some verbs, these are your actions: - `c` change -- `d` delete -- `g` go, +- ++"d"++ delete +- `g` go - `v` visual select - `y` yank (copy) -Then use those verbs with some modifiers +!!! TIP "Double tap to act on current line" + ++"d"++ ++"d"++ deletes the current line + + ++"y"++ ++"y"++ yanks (copies) the current line + + +## Motions + +Then use those verbs with some motions - `'` mark - `{ }` beginning/end of paragraph @@ -23,13 +41,15 @@ Then use those verbs with some modifiers - `s` surround - `t` till (move just before specified character) +## Text Objects + Then learn the text objects you can apply verbs and modifiers too -- `b` block/parentheses -- `p` paragraph, -- `s` sentence -- `t` tag e.g. html/xml -- `w` word +- `b` **block/parentheses** a text block or text between parens +- `p` **paragraph** - text to the next blank line +- `s` **sentence** - text to a full stop character +- `t` **tag** e.g. html/xml +- `w` **word** - blank space separated text ## Examples of speaking Vim @@ -56,3 +76,11 @@ Practice speaking evil with these examples | `y y` | yank (copy) current line | | `y w` | yank (copy) current word | | `y @ a` | yank (copy) to mark `a` (`m a` creates a mark called `a`) | + + +