aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/shortcuts.txt31
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
31flags, end: after the last /
32g = replace globally (all occurances on the current line)
33c = confirm each replace, also allows to switch to g (use the flag to see the help message)
34e = places the cursor in the end of the selection
35
36flags, 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
32gq = formats text so that it fits in whatever :set textwidth was set 44gq = formats text so that it fits in whatever :set textwidth was set
33iB = select block between curly braces (:help object-select) 45iB = select block between curly braces (:help object-select)
34 46
35 47
36[commands] 48[commands]
49command 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]
70ma = set marker a-z (a in this case) 86ma = set marker a-z (a in this case)
87mA = 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>
133CTRL-R = in normal mode: redoes what has been undone with u 153CTRL-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]
189gpm - 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]
163filetype can have multiple values, like python.django 193filetype can have multiple values, like python.django
164The last line can be a mode line, which holds settings like tab width: 194The 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
..