< cd ..

How to exit Vim

how-to-exit-vim.md

How to exit Vim

It is the question that has plagued humanity for decades. You have entered the editor. You have typed some text. Now, you wish to leave. But you cannot.

The Standard Method

  1. Press Esc (to ensure you are in Normal mode)
  2. Type :wq
  3. Press Enter

This writes (saves) and quits.

The Panic Method

  1. Press Esc repeatedly
  2. Type :q!
  3. Press Enter

This quits without saving. Use this when you have destroyed the file configuration and just want to go home.

The Nuclear Option

Unplug the computer.