Basic File Editing (3) Flashcards
Objective 103.8 Weight 3
1
Q
Which of the following are modes used in the vim/vi editor?
- Insert
- Command
- EX
- Keystroke
- Edit
- Normal
A
- Insert, 2. Command, 3. EX, 5. Edit AND 6. Normal
The three primary modes of the vim/vi editor are Insert (also called Edit or Entry), Command (also called Normal), and EX (also called Colon Commands).
2
Q
Which of the following methods can you use to exit the vi/vim editor?
- ZZ
- :wq
- :wq!
- :q!
- :x
- :zz
A
- ZZ, 2. :wq , 3. :wq!, 4. :q! AND 5. :x
There are various methods to exit the vi/vim editor. The only one that is not correct is the :zz keystroke sequence. Be aware that all the correct methods to leave the vi/vim editor save the contents to disk, except that the :q! keystroke sequence does NOT save the contents to disk.