Editing files with the vi editor tool
The vi program is a text editor that you can use to edit any text and particularly programs. During installation of software, the user will often have to edit text files like “Makefiles” or configuration files to make and fit they changes. The following are some of the most important keystroke commands to get around in vi.
Command Result
i Notifies vi to insert text before the cursor,
a Notifies vi to append text after the cursor,
dd Notifies vi to delete the current line,
x Notifies vi to delete the current character.
Esc Notifies vi to end the insert or append mode,
u Notifies vi to undo the last command.
Ctrl+f Scroll up one page.
Ctrl+b Scroll down one page,
/string Search forward for string.
:f Display filename and current line nmber.
:q Quit editor.
:q! Quit editor without saving changes.
:wq Save changes and exit editor.