Skip to main content

Just enough vi to open a file, edit it, and quit

Published: 2018-09-19 | Lastmod: 2019-05-08

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:

  1. vi <file> to open the file
  2. Press i for “INSERT” mode
  3. Make changes
  4. Press esc then enter :x to quit and save changes. To quit without saving changes enter :q!