diff options
Diffstat (limited to '.vim/doc/shortcuts.txt')
| -rw-r--r-- | .vim/doc/shortcuts.txt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/.vim/doc/shortcuts.txt b/.vim/doc/shortcuts.txt new file mode 100644 index 0000000..6b88797 --- /dev/null +++ b/.vim/doc/shortcuts.txt | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | [normal mode] | ||
| 2 | f{char} - move cursor to the character {char} | ||
| 3 | |||
| 4 | [visual mode] - with selected lines | ||
| 5 | gq - formats text so that it fits in whatever :set textwidth was set | ||
| 6 | |||
| 7 | |||
| 8 | [commands] | ||
| 9 | :spell [word] - adds a word to the current dictionary (no mistake any more) | ||
| 10 | :set list - display non printable characters | ||
| 11 | :retab - replaces tabs with spaces | ||
| 12 | :set expandtab - in insert mode: replace tab with spaces | ||
| 13 | |||
| 14 | |||
| 15 | [navigation] | ||
| 16 | <CTRL-]> - look up the tag under the cursor (help links as well) | ||
| 17 | <CTRL-T> - return back from tag under the cursor | ||
| 18 | |||
| 19 | |||
| 20 | [macros] - record and play back a series of vim commands | ||
| 21 | qa - start (q) macro recording in register a (can be anything) | ||
| 22 | q - stop macro recording | ||
| 23 | @a - replay macro a | ||
| 24 | :'<,'>normal @a - apply a to every line in the current selection | ||
| 25 | |||
| 26 | [marker] | ||
| 27 | ma - set marker a-z (a in this case) | ||
| 28 | 'a - go to marker a | ||
| 29 | |||
| 30 | [windows] | ||
| 31 | <C-W>v - splits buffer vertically (screen uses |) | ||
| 32 | <C-W>s - splits buffer horizontally (same as screen) | ||
| 33 | <C-W>w - moves the cursor to the next window and back | ||
| 34 | <C-W>[dir] - moves the cursor in that direction (use hjkl or arrow keys) | ||
| 35 | |||
| 36 | |||
| 37 | [vimdiff] | ||
| 38 | do - get changes from other window into the current | ||
| 39 | dp - put changes from current window into the other | ||
| 40 | ]c - jump to the next change | ||
| 41 | [c - jump to the prevous change | ||
