VIM Flashcards

1
Q

Execute ls command

A

:!ls

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

Open visual mode

A

v

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

Visual select word

A

vw

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

Open the file “hat.rb”

A

:e hat.rb

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

Open new line below

A

o

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

Open new line above

A

O

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

Go to end of word

A

e

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

Go to end of next word

A

2e

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

Append after cursor

A

a

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

Enter replace mode

A

R

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

Yank word

A

yw

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

Yank to end of current line

A

y$

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

Change search settings to ignore case

A

:set ic

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

Change search settings to use case

A

:set noic

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

Open file “sun.rb”

A

:e sun.rb

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

Get help for “w” command

17
Q

Delete character at cursor

18
Q

Insert at beginning of line

19
Q

Append at end of line

20
Q

Delete to end of line

21
Q

Go to beginning of text on current line

22
Q

Go to end of text on current line

23
Q

Go to beginning of current line

24
Q

Delete two words

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