VI Modes and Commands Flashcards

some Visual Editor commands and 2 modes page 78-79

1
Q

command mode

A

Characters typed perform actions like moving the cursor, cutting or copying text, or searching for a particular text string. vi opens in command mode.

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

insert mode

A

Actual text is typed or overwritten.

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

i

A

Insert before cursor (insertion command)

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

a

A

Append after cursor (insertion command)

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

o (little)

A

Insert below current line (insertion command)

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

O (big)

A

Insert above current line (insertion command)

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

yy

A

Copy line into memory (yank-yank) (insertion command)

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

p

A

Works with yy to place copied line onto the existing or next line (insertion command)

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

5p

A

Places five lines of what was copied, at cursor (insertion command)

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

x

A

Delete current character (deletion command)

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

r

A

Replace current character (deletion command)

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

dd

A

Delete current line (deletion command)

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

h

A

Move cursor one place to the left (Navigation Commands)

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

l (lowercase L)

A

Move cursor one place to the right (Navigation Commands)

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

j

A

Move cursor one place down (Navigation Commands)

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

k

A

Move cursor one place up (Navigation Commands)

17
Q

/

A

Searches within the document for a string (Navigation Commands)

18
Q

:set nu

A

Displays line numbers for each line of text (ex editor command)

19
Q

:set nonu

A

Removes line numbers from each line of text (ex editor command)

20
Q

:w

A

Writes (saves) latest changes to the file (exit commands)

21
Q

:q

A

Quits, leaving vi open in command mode (exit commands)

22
Q

:q!

A

Quits vi without saving changes (exit commands)

23
Q

:wq!

A

Saves file and any changes, and quits vi (exit commands)