forked from rtorr/vim-cheat-sheet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_config.yml
230 lines (210 loc) · 8.96 KB
/
_config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# Site settings
title: Vim Cheat Sheet
email: [email protected]
description: "A mobile friendly VIM cheat sheet"
baseurl: ""
url: "http://vim.rtorr.com"
twitter_username: richardiii
github_username: rtorr
# Build settings
markdown: kramdown
permalink: pretty
sass:
style: compressed
defaults:
-
scope:
path: ""
values:
lang: "en_us"
cursorMovement:
title: "Cursor movement"
commands:
h: "move cursor left"
j: "move cursor down"
k: "move cursor up"
l: "move cursor right"
w: "jump forwards to the start of a word"
W: "jump forwards to the start of a word (words can contain punctuation)"
e: "jump forwards to the end of a word"
E: "jump forwards to the end of a word (words can contain punctuation)"
b: "jump backwards to the start of a word"
B: "jump backwards to the start of a word (words can contain punctuation)"
H: "move to top of screen"
M: "move to middle of screen"
L: "move to bottom of screen"
zero: "jump to the start of the line"
caret: "jump to the first non-blank character of the line"
dollar: "jump to the end of the line"
g_: "jump to the last non-blank character of the line"
gg: "go to the first line of the document"
G: "go to the last line of the document"
fiveG: "go to line 5"
fx: "jump to next occurrence of character x"
tx: "jump to before next occurrence of character x"
closeCurlyBrace: "jump to next paragraph (or function/block, when editing code)"
openCurlyBrace: "jump to previous paragraph (or function/block, when editing code)"
CtrlPlusb: "move back one full screen"
CtrlPlusf: "move forward one full screen"
CtrlPlusu: "move back 1/2 a screen"
CtrlPlusd: "move forward 1/2 a screen"
tip: "Prefix a cursor movement command with a number to repeat it. For example, <kbd>4j</kbd> moves down 4 lines."
insertMode:
title: "Insert mode - inserting/appending text"
commands:
i: "insert before the cursor"
I: "insert at the beginning of the line"
a: "insert (append) after the cursor"
A: "insert (append) at the end of the line"
o: "append (open) a new line below the current line"
O: "append (open) a new line above the current line"
ea: "insert (append) at the end of the word"
Esc: "exit insert mode"
editing:
title: "Editing"
commands:
r: "replace a single character"
J: "join line below to the current one"
cc: "change (replace) entire line"
cw: "change (replace) to the end of the word"
cDollar: "change (replace) to the end of the line"
s: "delete character and substitute text"
S: "delete line and substitute text (same as cc)"
xp: "transpose two letters (delete and paste)"
u: "undo"
CtrlPlusr: "redo"
dot: "repeat last command"
markingText:
title: "Marking text (visual mode)"
commands:
v: "start visual mode, mark lines, then do a command (like y-yank)"
V: "start linewise visual mode"
o: "move to other end of marked area"
CtrlPlusv: "start visual block mode"
O: "move to other corner of block"
aw: "mark a word"
ab: "a block with ()"
aB: "a block with {}"
ib: "inner block with ()"
iB: "inner block with {}"
Esc: "exit visual mode"
visualCommands:
title: "Visual commands"
commands:
greaterThan: "shift text right"
lessThan: "shift text left"
y: "yank (copy) marked text"
d: "delete marked text"
tilde: "switch case"
registers:
title: "Registers"
commands:
show: "show registers content"
pasteRegisterX: "paste contents of register x"
yankIntoRegisterX: "yank into register x"
tip1: "Registers are being stored in ~/.viminfo, and will be loaded again on next restart of vim."
tip2: "Register 0 contains always the value of the last yank command."
marks:
title: "Marks"
commands:
list: "list of marks"
currentPositionA: "set current position for mark A"
jumpPositionA: "jump to position of mark A"
yankToMarkA: "yank text to position of mark A"
tip: ""
macros:
title: "Macros"
commands:
recordA: "record macro a"
stopRecording: "stop recording macro"
rerun: "rerun last run macro"
global:
title: "Global"
commands:
helpForKeyword: "open help for keyword"
openFile: "open file"
saveAsFile: "save file as"
closePane: "close current pane"
cutAndPaste:
title: "Cut and paste"
commands:
yy: "yank (copy) a line"
twoyy: "yank (copy) 2 lines"
yw: "yank (copy) the characters of the word from the cursor position to the start of the next word"
yiw: "yank (copy) word under the cursor"
yaw: "yank (copy) word under the cursor and the space after or before it"
yDollar: "yank (copy) to end of line"
p: "put (paste) the clipboard after cursor"
P: "put (paste) before cursor"
dd: "delete (cut) a line"
twodd: "delete (cut) 2 lines"
dw: "delete (cut) the characters of the word from the cursor position to the start of the next word"
diw: "delete (cut) word under the cursor"
daw: "yank (copy) word under the cursor and the space after or before it"
D: "delete (cut) to the end of the line"
dDollar: "delete (cut) to the end of the line"
x: "delete (cut) character"
exiting:
title: "Exiting"
commands:
colonw: "write (save) the file, but don't exit"
colonwsudo: "write out the current file using sudo"
colonwq: "write (save) and quit"
colonx: "write (save) and quit"
colonq: "quit (fails if there are unsaved changes)"
colonqbang: "quit and throw away unsaved changes"
searchAndReplace:
title: "Search and replace"
commands:
forwardSlashPattern: "search for pattern"
questionMarkPattern: "search backward for pattern"
backslashVpattern: "'very magic' pattern: non-alphanumeric characters are interpreted as special regex symbols (no escaping needed)"
n: "repeat search in same direction"
N: "repeat search in opposite direction"
colonPercentForwardSlashOldForwardSlashNewForwardSlashg: "replace all old with new throughout file"
colonPercentForwardSlashOldForwardSlashNewForwardSlashgc: "replace all old with new throughout file with confirmations"
colonnoh: "remove highlighting of search matches"
searchMultipleFiles:
title: "Search in multiple files"
commands:
colonvimgrep: "search for pattern in multiple files"
coloncn: "jump to the next match"
coloncp: "jump to the previous match"
coloncopen: "open a window containing the list of matches"
workingWithMultipleFiles:
title: "Working with multiple files"
commands:
colone: "edit a file in a new buffer"
colonbnext: "go to the next buffer"
colonbprev: "go to the previous buffer"
colonls: "list all open buffers"
colonbd: "delete a buffer (close a file)"
colonsp: "open a file in a new buffer and split window"
colonvsp: "open a file in a new buffer and vertically split window"
ctrlPlusws: "split window"
ctrlPlusww: "switch windows"
ctrlPluswq: "quit a window"
ctrlPluswv: "split window vertically"
ctrlPluswh: "move cursor to the left window (vertical split)"
ctrlPluswl: "move cursor to the right window (vertical split)"
ctrlPluswj: "move cursor to the window below (horizontal split)"
ctrlPluswk: "move cursor to the window above (horizontal split)"
tabs:
title: "Tabs"
commands:
colonTabNew: "open a file in a new tab"
ctrlPluswT: "move the current split window into its own tab"
gt: "move to the next tab"
gT: "move to the previous tab"
hashgt: "move to tab number #"
colontabmove: "move current tab to the #th position (indexed from 0)"
colontabc: "close the current tab and all its windows"
colontabo: "close all tabs except for the current one"
colontabdo: "run the <code>command</code> on all tabs (e.g. <code>:tabdo q</code> - closes all opened tabs)"
words:
keyword: "keyword"
file: "file"
movement: "movement"
languages:
title: "Languages"
footer: "Checkout the source on"