VIM Flashcards
1
Q
Execute ls command
A
:!ls
2
Q
Open visual mode
A
v
3
Q
Visual select word
A
vw
4
Q
Open the file “hat.rb”
A
:e hat.rb
5
Q
Open new line below
A
o
6
Q
Open new line above
A
O
7
Q
Go to end of word
A
e
8
Q
Go to end of next word
A
2e
9
Q
Append after cursor
A
a
10
Q
Enter replace mode
A
R
11
Q
Yank word
A
yw
12
Q
Yank to end of current line
A
y$
13
Q
Change search settings to ignore case
A
:set ic
14
Q
Change search settings to use case
A
:set noic
15
Q
Open file “sun.rb”
A
:e sun.rb
16
Q
Get help for “w” command
A
:help w
17
Q
Delete character at cursor
A
x
18
Q
Insert at beginning of line
A
I
19
Q
Append at end of line
A
A
20
Q
Delete to end of line
A
d$
21
Q
Go to beginning of text on current line
A
^
22
Q
Go to end of text on current line
A
$
23
Q
Go to beginning of current line
A
0
24
Q
Delete two words
A
d2w
25
Delete entire line
dd
26
Undo last change
u
27
Undo changes on entire line
U
28
Redo changes
ctrl+R
29
Start recording macro in "1" register
q1
30
Stop recording macro
q
31
Play "1" macro
@1
32
Replay last macro
@@
33
Show yank register
:reg
34
Paste from 0 register
"0p
35
Copy onto clipboard
"+y
36
Enclose word with qoutes
`cw""P`
c - cut into register
w - regex match \w
"" - insert two " characters at current cursor position
- VIM shorthand for hitting the escape key. In this context, return to command mode
P - paste current register
37
Back a word
b