VI Text Editor Commands Flashcards

1
Q

vi filename

A

Start a vi session with document filename

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

vi

A

Start a vi session

User must type :w filename in order to save file

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

command mode

A

default mode when starting vi, user presses a letter for a command

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

input mode

A

allows user to enter or modify text.

press ESC to return to command mode

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

last-line mode

A

opens prompt to enter letter or word commands for more complex operations, such as search and replace

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

h

A

left (command mode)

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

j

A

down (command mode)

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

k

A

up (command mode)

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

l

A

right (command mode)

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

w

A

right one word to special character (command mode)

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

W

A

right one word including special character (command mode)

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

b

A

left one word to special character (command mode)

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

B

A

left one word including special character (command mode)

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

0

A

beginning of line (command mode)

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

$

A

end of line (command mode)

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

i

A

insert to left of cursor (command > input mode)

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

I

A

insert at beginning of line (command > input mode)

18
Q

o

A

insert below current line (command > input mode)

19
Q

O

A

insert line above current line (command > input mode)

20
Q

a

A

append to right of cursor (command > input mode)

21
Q

A

A

append at end of current line (command > input mode)

22
Q

r

A

replace character (command > input mode)

23
Q

R

A

overwrite text (command > input mode)

24
Q

x

A

delete single character (editing)

25
d
delete (editing)
26
c
change (editing)
27
y
yank, or copy (editing)
28
p
paste below cursor (editing)
29
P
paste above cursor (editing)
30
u
undo previous edit (editing)
31
.
repeat previous edit (editing)
32
editing command
editing commands may be preceeded by a number, to affect the extent of the command
33
#dd
delete multiple lines
34
/pattern
search forward for pattern (command mode)
35
?pattern
search backwards for pattern (command mode)
36
n
display next match (command mode)
37
//
repeat previous search (command mode)
38
return to command mode
39
ZZ
Save work and exit from command mode
40
:x
Save work and exit from last line mode
41
:w
save without exiting (command mode)
42
:q!
abort current editing session