1.5 Text Editors Flashcards
What is vim
Vim (vi improved), also referred to as vi, is a utility that creates and modifies text files. It is the standard command-line text editor included with Linux distributions.
What are the different vim modes?
- Command mode is the initial mode vim uses when started. It has commands that cut and replace text, and it is the mode vi uses to enter the other modes.
- Command Line mode is the mode that works with the file system. Use it to save files after editing them.
- Edit mode is the mode that vim uses to write and edit text in the file.
What are the two operation modes of the vim edit mode?
- Insert mode adds text between the preceding and subsequent text.
- Replace mode overwrites subsequent text.
What does the vi command do?
Starts vim.
What does the command vi filename do?
Starts vim and immediately begins working on the named file (either a new, non-existent file or an existing file).
What does the Insert key do in the vim editor when in command mode?
Places vim in Insert mode from Command mode.
What does the i key do in the vim editor when in command mode?
Places vim in Insert mode from Command mode.
What does the s key do in the vim editor when in command mode?
Places vim in Insert mode from Command mode.
What does the Esc key do in the vim editor when in Insert/Replace mode?
Places vim in Command mode from Edit mode.
What does the Delete key do in the vim editor when in Insert/Replace mode?
Deletes text.
What does the Insert key do in the vim editor when in Insert/Replace mode?
Toggles between Insert and Replace mode while in edit mode.
What does entering a number do in the vim editor when in Command mode?
Goes to a specific line in the document.
What do the keystrokes dw do in the vim editor when in Command mode?
Cuts a whole word and trailing space.
What do the keystrokes de do in the vim editor when in Command mode?
Cuts a whole word but omits the trailing space.
What do the keystrokes d$ or D do in the vim editor when in Command mode?
Cuts all text following the cursor to the end of the line.
What do the keystrokes dd do in the vim editor when in Command mode?
Cuts a line from the text.