{ claus.conrad }



How to Exit the Vi or Vim Editor

  1. Press the Esc key a few times. This will ensure vi is out of Insert mode and in Command mode.

  2. Type :q! and press Enter. This tells vi to quit without saving any changes.

    (If you do want to save your changes, type :wq instead.)

Source: Dave McKay