VI Text Editor Commands Flashcards
vi filename
Start a vi session with document filename
vi
Start a vi session
User must type :w filename in order to save file
command mode
default mode when starting vi, user presses a letter for a command
input mode
allows user to enter or modify text.
press ESC to return to command mode
last-line mode
opens prompt to enter letter or word commands for more complex operations, such as search and replace
h
left (command mode)
j
down (command mode)
k
up (command mode)
l
right (command mode)
w
right one word to special character (command mode)
W
right one word including special character (command mode)
b
left one word to special character (command mode)
B
left one word including special character (command mode)
0
beginning of line (command mode)
$
end of line (command mode)
i
insert to left of cursor (command > input mode)