1

I would like Vim to quit without saving when I enter :q.

It annoys me when Vim prompts me to save when I try to quit a document with :q having made changes to it. Whenever I want to keep changes I save them. Plus the ! of :q! is awkwardly positioned on my UK keyboard. How can I remap :q to act like :q!?

And Finally
  • 5,602
  • 14
  • 70
  • 110

1 Answers1

5

You can use cabbrev, that works like a map from a command line instruction to another one, like:

:cabbrev q q!

So now just type:

:q

and it will omit changes to exit without asking.

Birei
  • 35,723
  • 2
  • 77
  • 82