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