OSDN Git Service

Regular updates
[twpd/master.git] / vim.md
diff --git a/vim.md b/vim.md
index 96d9bb3..a1cdfc7 100644 (file)
--- a/vim.md
+++ b/vim.md
@@ -3,7 +3,7 @@ title: Vim
 category: Vim
 layout: 2017/sheet
 tags: [Featured]
-updated: 2018-09-11
+updated: 2020-07-05
 weight: -10
 intro: |
  [Vim](http://www.vim.org/) is a very efficient text editor. This reference was made for Vim 8.0.   
@@ -18,7 +18,7 @@ Getting started
 {: .-prime}
 
 | Shortcut       | Description                      |
-| ---            | ---                              |
+| -------------- | -------------------------------- |
 | `:qa`          | Close all files                  |
 | `:qa!`         | Close all files, abandon changes |
 | ---            | ---                              |
@@ -37,13 +37,14 @@ Getting started
 | Shortcut            | Description       |
 | ---                 | ---               |
 | `h` `j` `k` `l`     | Arrow keys        |
-| `<C-U>` _/_ `<C-D>` | Page up/page down |
+| `<C-U>` _/_ `<C-D>` | Half-page up/down |
+| `<C-B>` _/_ `<C-F>` | Page up/down      |
 {: .-shortcuts}
 
 #### Words
 
 | Shortcut     | Description               |
-ff| ---          | ---                       |
+| ---          | ---                       |
 | `b` _/_ `w`  | Previous/next word        |
 | `ge` _/_ `e` | Previous/next end of word |
 {: .-shortcuts}
@@ -79,11 +80,22 @@ ff| ---          | ---                       |
 | ---      | ---                      |
 | `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                     |
@@ -102,6 +114,7 @@ ff| ---          | ---                       |
 | Shortcut | Description                         |
 | ---      | ---                                 |
 | `a`      | Append                              |
+| `A`      | Append from end of line             |
 | `i`      | Insert                              |
 | `o`      | Next line                           |
 | `O`      | Previous line                       |
@@ -127,15 +140,18 @@ ff| ---          | ---                       |
 
 ### Clipboard
 
-| Shortcut | Description         |
-| ---      | ---                 |
-| `x`      | Delete character    |
-| ---      | ---                 |
-| `dd`     | Delete line _(Cut)_ |
-| `yy`     | Yank line _(Copy)_  |
-| ---      | ---                 |
-| `p`      | Paste               |
-| `P`      | Paste before        |
+| Shortcut        | Description                 |
+| ---             | ---                         |
+| `x`             | Delete character            |
+| ---             | ---                         |
+| `dd`            | Delete line _(Cut)_         |
+| `yy`            | Yank line _(Copy)_          |
+| ---             | ---                         |
+| `p`             | Paste                       |
+| `P`             | Paste before                |
+| ---             | ---                         |
+| `"*p` _/_ `"+p` | Paste from system clipboard |
+| `"*y` _/_ `"+y` | Paste to system clipboard   |
 {: .-shortcuts}
 
 ### Visual mode
@@ -182,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                       |
@@ -258,7 +275,7 @@ See [Operators](#operators) for other things you can do.
  
 | Shortcut                             | Description                              |
 | ---                                  | ---                                      |
-| `gvimdiff file1 file2 [file3]`       | See differencies between files, in HMI   |
+| `gvimdiff file1 file2 [file3]`       | See differences between files, in HMI    |
  
 
 Misc
@@ -289,6 +306,7 @@ Uppercase ones are recursive (eg, `zO` is open recursively).
 
 | Shortcut            | Description                |
 | ---                 | ---                        |
+| `%`                 | Nearest/matching `{[()]}`  |
 | `[(` `[{` `[<`      | Previous `(` or `{` or `<` |
 | `])`                | Next                       |
 | ---                 | ---                        |
@@ -349,15 +367,31 @@ Do these in visual or normal mode.
 
 ### Marks
 
-| Shortcut        | Description                                        |
-| ---             | ---                                                |
-| <code>`^</code> | Last position of cursor in insert mode             |
-| <code>`.</code> | Last change                                        |
-| <code>``</code> | Last jump                                          |
-| ---             | ---                                                |
-| `ma`            | Mark this cursor position as `a`                   |
-| <code>`a</code> | Jump to the cursor position `a`                    |
-| `'a`            | Jump to the beginning of the line with position `a`|
+| Shortcut           | Description                                          |
+| ---                | ---                                                  |
+| <code>`^</code>    | Last position of cursor in insert mode               |
+| <code>`.</code>    | Last change in current buffer                        |
+| <code>`"</code>    | Last exited current buffer                           |
+| <code>`0</code>    | In last file edited                                  |
+| <code>''</code>    | Back to line in current buffer where jumped from     |
+| <code>``</code>    | Back to position in current buffer where jumped from |
+| <code>`[</code>    | To beginning of previously changed or yanked text    |
+| <code>`]</code>    | To end of previously changed or yanked text          |
+| <code>`&lt;</code> | To beginning of last visual selection                |
+| <code>`&gt;</code> | To end of last visual selection                      |
+| ---                | ---                                                  |
+| `ma`               | Mark this cursor position as `a`                     |
+| <code>`a</code>    | Jump to the cursor position `a`                      |
+| `'a`               | Jump to the beginning of the line with position `a`  |
+| <code>d'a</code>   | Delete from current line to line of mark `a`         |
+| <code>d`a</code>   | Delete from current position to position of mark `a` |
+| <code>c'a</code>   | Change text from current line to line of `a`         |
+| <code>y`a</code>   | 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
@@ -367,7 +401,7 @@ Do these in visual or normal mode.
 | `.`        | Repeat last command                               |
 | `]p`       | Paste under the current indentation level         |
 | ---        | ---                                               |
-| `:ff=unix` | Convert Windows line endings to Unix line endings |
+| `:set ff=unix` | Convert Windows line endings to Unix line endings |
 {: .-shortcuts}
 
 ### Command line