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
Q

d

A

delete (editing)

26
Q

c

A

change (editing)

27
Q

y

A

yank, or copy (editing)

28
Q

p

A

paste below cursor (editing)

29
Q

P

A

paste above cursor (editing)

30
Q

u

A

undo previous edit (editing)

31
Q

.

A

repeat previous edit (editing)

32
Q

editing command

A

editing commands may be preceeded by a number, to affect the extent of the command

33
Q

dd

A

delete multiple lines

34
Q

/pattern

A

search forward for pattern (command mode)

35
Q

?pattern

A

search backwards for pattern (command mode)

36
Q

n

A

display next match (command mode)

37
Q

//

A

repeat previous search (command mode)

38
Q
A

return to command mode

39
Q

ZZ

A

Save work and exit from command mode

40
Q

:x

A

Save work and exit from last line mode

41
Q

:w

A

save without exiting (command mode)

42
Q

:q!

A

abort current editing session