diff options
author | Max Christian Pohle | 2018-01-16 23:23:13 +0100 |
---|---|---|
committer | Max Christian Pohle | 2018-01-16 23:23:13 +0100 |
commit | 989a349f9a5da58f5b158c448c93e6a6005cb867 (patch) | |
tree | 47a6a670f52cd409bc202ca5644b85d5fa42219c | |
parent | c4940f0dfa20b7cd960713f127ded8603f047094 (diff) | |
download | vim-karlmarks-989a349f9a5da58f5b158c448c93e6a6005cb867.tar.bz2 vim-karlmarks-989a349f9a5da58f5b158c448c93e6a6005cb867.zip |
Added a few shortcuts to shortcuts.txt
-rw-r--r-- | doc/shortcuts.txt | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/doc/shortcuts.txt b/doc/shortcuts.txt index d70855f..015684e 100644 --- a/doc/shortcuts.txt +++ b/doc/shortcuts.txt | |||
@@ -28,12 +28,26 @@ caw = select 'a word' | |||
28 | :g!/foo/s/bar//g = on lines not containing foo replace bar with nothing | 28 | :g!/foo/s/bar//g = on lines not containing foo replace bar with nothing |
29 | :g!/^foo/execute("normal dd") delete lines starting with foo | 29 | :g!/^foo/execute("normal dd") delete lines starting with foo |
30 | 30 | ||
31 | flags, end: after the last / | ||
32 | g = replace globally (all occurances on the current line) | ||
33 | c = confirm each replace, also allows to switch to g (use the flag to see the help message) | ||
34 | e = places the cursor in the end of the selection | ||
35 | |||
36 | flags, within the search string: | ||
37 | \v = use very magic search (more like perl) | ||
38 | \V = use no very magic, more like searching verbatim | ||
39 | \zs .. \ze = mark begin and end of a sub pattern (like perl lookaround assertions) | ||
40 | |||
41 | |||
42 | |||
31 | [visual mode] # with selected lines | 43 | [visual mode] # with selected lines |
32 | gq = formats text so that it fits in whatever :set textwidth was set | 44 | gq = formats text so that it fits in whatever :set textwidth was set |
33 | iB = select block between curly braces (:help object-select) | 45 | iB = select block between curly braces (:help object-select) |
34 | 46 | ||
35 | 47 | ||
36 | [commands] | 48 | [commands] |
49 | command line mode begins with : and has its own key mappings starting with c like in cnormap | ||
50 | |||
37 | :spell [word] = adds a word to the current dictionary (no mistake any more) | 51 | :spell [word] = adds a word to the current dictionary (no mistake any more) |
38 | :set list = display non printable characters | 52 | :set list = display non printable characters |
39 | :retab = replaces tabs with spaces | 53 | :retab = replaces tabs with spaces |
@@ -42,6 +56,8 @@ iB = select block between curly braces (:help object-select) | |||
42 | :Lex = use netrw as project drawer (stays open in its own window) | 56 | :Lex = use netrw as project drawer (stays open in its own window) |
43 | :only = 'maximize' current buffer | 57 | :only = 'maximize' current buffer |
44 | 58 | ||
59 | <c-r><c-w> = auto completion with the word under the cursor (interesting with incsearch) | ||
60 | |||
45 | 61 | ||
46 | [navigation] | 62 | [navigation] |
47 | <CTRL-]> = look up the tag under the cursor (help links as well) | 63 | <CTRL-]> = look up the tag under the cursor (help links as well) |
@@ -68,10 +84,12 @@ notice, that registers get used for both: macro recordings and copying text | |||
68 | 84 | ||
69 | [marker] | 85 | [marker] |
70 | ma = set marker a-z (a in this case) | 86 | ma = set marker a-z (a in this case) |
87 | mA = create a session persistent file marker which can be used to reopen a file (not bound to the buffer) | ||
71 | `a = go to marker a (line & column) | 88 | `a = go to marker a (line & column) |
72 | 'a = go to marker a (line, first non blank), same as `a^ | 89 | 'a = go to marker a (line, first non blank), same as `a^ |
73 | 90 | ||
74 | 91 | ||
92 | |||
75 | [hotkeys] | 93 | [hotkeys] |
76 | <C-A>, <C-X> = increment, decrement number under the cursor | 94 | <C-A>, <C-X> = increment, decrement number under the cursor |
77 | 95 | ||
@@ -82,6 +100,8 @@ ma = set marker a-z (a in this case) | |||
82 | <C-W>w = moves the cursor to the next window and back | 100 | <C-W>w = moves the cursor to the next window and back |
83 | <C-W>[dir] = moves the cursor in that direction (use hjkl or arrow keys) | 101 | <C-W>[dir] = moves the cursor in that direction (use hjkl or arrow keys) |
84 | <C-W>[HK] = make a vertical split horizontal and vice versa | 102 | <C-W>[HK] = make a vertical split horizontal and vice versa |
103 | <C-W>o = only: close all other windows | ||
104 | <C-W>c = close: current window in which the cursor sits | ||
85 | 105 | ||
86 | 106 | ||
87 | [vimdiff] | 107 | [vimdiff] |
@@ -133,6 +153,11 @@ CTRL-R<register> = in insert mode and command line: paste contents of <register> | |||
133 | CTRL-R = in normal mode: redoes what has been undone with u | 153 | CTRL-R = in normal mode: redoes what has been undone with u |
134 | "<register>p = in normal mode: paste paste contents of <register> | 154 | "<register>p = in normal mode: paste paste contents of <register> |
135 | 155 | ||
156 | [registers] | ||
157 | "/ = last search expression | ||
158 | ": = last command entered | ||
159 | "= = expression register (to do calculations or call vim functions) | ||
160 | |||
136 | 161 | ||
137 | 162 | ||
138 | [netrw] | 163 | [netrw] |
@@ -159,9 +184,13 @@ viB:sort = sort inner block by name | |||
159 | 184 | ||
160 | :finish = from within a viml-script: stop sourcing it | 185 | :finish = from within a viml-script: stop sourcing it |
161 | 186 | ||
187 | |||
188 | [programs] | ||
189 | gpm - cut and paste helper for the linux console (to get text from CTRL-ALT-F2 to CTRL-ALT-F3) | ||
190 | |||
191 | |||
162 | [vim modeline] | 192 | [vim modeline] |
163 | filetype can have multiple values, like python.django | 193 | filetype can have multiple values, like python.django |
164 | The last line can be a mode line, which holds settings like tab width: | 194 | The last line can be a mode line, which holds settings like tab width: |
165 | 195 | ||
166 | |||
167 | # vim: noai:ts=2:sw=2 filetype=dosini.text | 196 | # vim: noai:ts=2:sw=2 filetype=dosini.text |