Just Enough vi to Open a File, Edit It, and Quit
Published: Sep 19, 2018
Updated: May 3, 2021
Updated: May 3, 2021
vi
is something I use rarely, usually when I don’t have access to a GUI text editor. For those times, here’s just enough to do what I need:
vi <file>
to open the file- Press
i
for “INSERT” mode - Make changes
- Press
esc
then enter:x
to quit and save changes. To quit without saving changes enter:q!