103.8 Basic file editing Flashcards
How do you create a file from scratch with vi/vim?
Just enter #vi and start creating the file. No name of the file is needed at this point.
How do you create a file from scratch with vi/vim?
Just enter #vi and start creating the file. No name of the file is needed at this point.
What is the mode called that you land on when you first open vi/vim?
Command mode
What key within vi/vim takes you from command mode to insert mode?
The i key
What key within vi/vim takes you from insert mode to command mode?
The ESC key
What key in insert mode in vi/vim inserts a new line after the current line?
The o key
Which are the most common keys used to move around in vi/vim?
The k key moves up.
The h key moves left.
The l key moves right.
The j key moves down.
What key within vi/vim takes you from command mode to visual mode?
The v key
What key within vi/vim’s visual mode lets you select text from left to right?
Get the cursor to the left of what you want to select and press the L key or right arrow.
What key within vi/vim’s visual mode lets yank (copy) highlighted text?
The y key
What key within vi/vim’s visual mode lets you paste yanked text?
The p key
What key within vi/vim’s visual mode lets you undo a change?
The u key
How do you exit vi/vim?
:q or :q! from command mde (no changes are saved)
How do you save changes and exit vi/vim?
:wq or :wq! from command mode
How do you save a file you just created with vi/vim?
:w (then hit space bar) then type the name of the file and hit enter