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
Q

Delete entire line

26
Q

Undo last change

27
Q

Undo changes on entire line

28
Q

Redo changes

29
Q

Start recording macro in “1” register

30
Q

Stop recording macro

31
Q

Play “1” macro

32
Q

Replay last macro

33
Q

Show yank register

34
Q

Paste from 0 register

35
Q

Copy onto clipboard

36
Q

Enclose word with qoutes

A

cw""<ESC>P

c - cut into register

w - regex match \w

”” - insert two “ characters at current cursor position

<ESC> - VIM shorthand for hitting the escape key. In this context, return to command mode

P - paste current register
</ESC>

37
Q

Back a word