VI (VIM) MODE Flashcards

Understanding Vi

1
Q

Exit vi mode for file4, but do NOT save the contents of the file

A

1) Esc
2) :q!

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

When skimming a file in vi, skip to the beginning of the file

A

[[

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

]]

A

Skips to the end of the file in vi

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

Start a new line above the previous line

A

O

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

Start a new line below the previous line

A

o

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

Delete a line

A

dd

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

Undo previous changes

A

u

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

Appends text after cursor

A

a

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

Move cursor to the end of the line

A

A

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

Move cursor to the left

A

h

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

Move cursor down

A

j

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

Move cursor to the right

A

l

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

Move cursor up

A

k

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

Move to the next word

A

w

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

Move to next word after each blank space

A

W

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

Move to end of word

A

e

17
Q

i

A

Enter into insert mode

18
Q

(

A

Moves sentence back

19
Q

)

A

Moves sentence forward

20
Q

gg

A

Moves to top first word of the document

21
Q

G

A

Moves to the bottom first word of the document

22
Q

x

A

Delete a character

23
Q

Skip to next word

A

n

24
Q

Exit and save

A

1) Esc
2) :wq or :x or :wq!

25
Q

/

A

Used to search a word or string of words
/ [word(s) searching for]

26
Q

r

A

replaces a character
r[character]