vi Commands Flashcards
What are the commands for switching between insert and command mode?
i for going into insert
esc for going back to command mode
What does the following command do: x
Deletes the current character
What does the following command do: dd
Deletes the current line
What does the following command do: u
Undo the last change
What does the following command do: /
Searches for the text to follow
What does the following command do: :w
Writes to the file
What does the following command do: :wq
Writes to the file and quits
What does the following command do: :q
Quits if no change has been made
What does the following command do: :q!
Exit without saving
What does the following command do for cursor movement: h
One character left
What does the following command do for cursor movement: j
Move one line down
What does the following command do for cursor movement: k
Move one line up
What does the following command do for cursor movement: l
move one character right
What does the following command do for cursor movement: w
Move to the next word
What does the following command do for cursor movement: e
Move to the end of the current word