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

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
Q

Delete entire line

A

dd

26
Q

Undo last change

A

u

27
Q

Undo changes on entire line

A

U

28
Q

Redo changes

A

ctrl+R

29
Q

Start recording macro in “1” register

A

q1

30
Q

Stop recording macro

A

q

31
Q

Play “1” macro

A

@1

32
Q

Replay last macro

A

@@

33
Q

Show yank register

A

:reg

34
Q

Paste from 0 register

A

“0p

35
Q

Copy onto clipboard

A

“+y

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

A

b