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