VIM Commands Flashcards

(77 cards)

1
Q

move left

A

h

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

move down

A

j

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

move up

A

k

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

move right

A

l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

jump by start of words (punctuation considered words)

A

w

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

jump by words (spaces separate words)

A

W

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

jump to end of words (punctuation considered words)

A

e

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

jump to end of words (no punctuation)

A

E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

jump backward by words (punctuation considered words)

A

b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

jump backward by words (no punctuation)

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

(zero) start of line

A

0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

first non-blank character of line

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

end of line

A

$

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Go To command (prefix with number

A

G

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Repeat cursor movement command

A

Prefix a cursor movement command with a number to repeat it. For example, 4j moves down 4 lines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

start insert mode at cursor

A

i

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

insert at the beginning of the line

A

I

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

append after the cursor

A

a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

append at the end of the line

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

open (append) blank line below current line (no need to press return)

A

o

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

open blank line above current line

A

O

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

append at end of word

A

ea

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

exit insert mode

A

Esc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

replace a single character (does not use insert mode)

A

r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
join line below to the current one
J
26
change (replace) an entire line
cc
27
change (replace) to the end of word
cw
28
change (replace) to the end of line
c$
29
delete character at cursor and subsitute text
s
30
delete line at cursor and substitute text (same as cc)
S
31
transpose two letters (delete and paste, technically)
xp
32
undo
u
33
repeat last command
.
34
start visual mode, mark lines, then do command (such as y-yank)
v
35
start Linewise visual mode
V
36
move to other end of marked area
o
37
start visual block mode
Ctrl+v
38
move to Other corner of block
O
39
mark a word
aw
40
a () block (with braces)
ab
41
a {} block (with brackets)
aB
42
inner () block
ib
43
inner {} block
iB
44
exit visual mode
Esc
45
shift right
>
46
shift left
<
47
yank (copy) marked text
y
48
delete marked text
d
49
switch case
~
50
yank (copy) a line
yy
51
yank 2 lines
2yy
52
yank word
yw
53
yank to end of line
y$
54
put (paste) the clipboard after cursor
p
55
put (paste) before cursor
P
56
delete (cut) a line
dd
57
delete (cut) the current word
dw
58
delete (cut) current character
x
59
write (save) the file, but don't exit
:w
60
write (save) and quit
:wq
61
quit (fails if anything has changed)
:q
62
quit and throw away changes
:q!
63
search for pattern
/pattern
64
search backward for pattern
?pattern
65
repeat search in same direction
n
66
repeat search in opposite direction
N
67
replace all old with new throughout file
:%s/old/new/g
68
replace all old with new throughout file with confirmations
:%s/old/new/gc
69
Edit a file in a new buffer
:e filename
70
go to next buffer
:bnext (or :bn)
71
go to previous buffer
:bprev (of :bp)
72
delete a buffer (close a file)
:bd
73
Open a file in a new buffer and split window
:sp filename
74
Split windows
ctrl+ws
75
switch between windows
ctrl+ww
76
Quit a window
ctrl+wq
77
Split windows vertically
ctrl+wv