forked from rtorr/vim-cheat-sheet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_config.yml
165 lines (151 loc) · 6.38 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
# 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
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)"
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: "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)"
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"
cutAndPaste:
title: "Cut and paste"
commands:
yy: "yank (copy) a line"
twoyy: "yank (copy) 2 lines"
yw: "yank (copy) word"
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) word"
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"
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"
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"
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"
languages:
title: "Languages"
footer: "Checkout the source on"