From 6a1378f310c9d181988474371f4635fae51f8f86 Mon Sep 17 00:00:00 2001 From: Artemee Date: Sun, 12 Jul 2020 17:13:50 +0300 Subject: [PATCH] Update vim.md (#1334) Co-authored-by: Rico Sta. Cruz --- vim.md | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/vim.md b/vim.md index 0553d52b..a1cdfc73 100644 --- a/vim.md +++ b/vim.md @@ -37,7 +37,8 @@ Getting started | Shortcut | Description | | --- | --- | | `h` `j` `k` `l` | Arrow keys | -| `` _/_ `` | Page up/page down | +| `` _/_ `` | Half-page up/down | +| `` _/_ `` | Page up/down | {: .-shortcuts} #### Words @@ -79,11 +80,22 @@ Getting started | --- | --- | | `zz` | Center this line | | `zt` | Top this line | +| `zb` | Bottom this line | | `H` | Move to top of screen | | `M` | Move to middle of screen | | `L` | Move to bottom of screen | {: .-shortcuts} +#### Search + +| Shortcut | Description | +| --- | --- | +| `n` | Next matching search pattern | +| `N` | Previous match | +| `*` | Next whole word under cursor | +| `#` | Previous whole word under cursor | +{: .-shortcuts} + #### Tab pages | Shortcut | Description | @@ -186,6 +198,7 @@ Operators let you operate in a range of text (defined by *motion*). These are pe | --- | --- | | `>` | Indent right | | `<` | Indent left | +| `=` | Autoindent | | --- | --- | | `g~` | Swap case | | `gU` | Uppercase | @@ -354,15 +367,31 @@ Do these in visual or normal mode. ### Marks -| Shortcut | Description | -| --- | --- | -| `^ | Last position of cursor in insert mode | -| `. | Last change | -| `` | Last jump | -| --- | --- | -| `ma` | Mark this cursor position as `a` | -| `a | Jump to the cursor position `a` | -| `'a` | Jump to the beginning of the line with position `a`| +| Shortcut | Description | +| --- | --- | +| `^ | Last position of cursor in insert mode | +| `. | Last change in current buffer | +| `" | Last exited current buffer | +| `0 | In last file edited | +| '' | Back to line in current buffer where jumped from | +| `` | Back to position in current buffer where jumped from | +| `[ | To beginning of previously changed or yanked text | +| `] | To end of previously changed or yanked text | +| `< | To beginning of last visual selection | +| `> | To end of last visual selection | +| --- | --- | +| `ma` | Mark this cursor position as `a` | +| `a | Jump to the cursor position `a` | +| `'a` | Jump to the beginning of the line with position `a` | +| d'a | Delete from current line to line of mark `a` | +| d`a | Delete from current position to position of mark `a` | +| c'a | Change text from current line to line of `a` | +| y`a | Yank text from current position to position of `a` | +| --- | --- | +| `:marks` | List all current marks | +| `:delm a` | Delete mark `a` | +| `:delm a-d` | Delete marks `a`, `b`, `c`, `d` | +| `:delm abc` | Delete marks `a`, `b`, `c` | {: .-shortcuts} ### Misc