ddfxeg
Last Updated: February 25, 2016
·
829
· abhshkdz
A36d4f1831b3e2c95fa1e42fc45f82d5

Quickly Exit Vim

For most people (including me), :wq is a laborious quitting sequence. Here's an easier way:

Shift + z + z

Holding shift and pressing z twice from command mode saves the file and exits.

Say Thanks
Respond

2 Responses
Add your response

9839
Me

There is also alternative command :x. ZZ shortcut is nice, but I have some written on my own:

  • ZX - mapped to :cq which quits with error (useful when dealing with Git)
  • ZA - quit all without saving (:qa)
  • ZS - quit all with saving (:xa)
over 1 year ago ·
14300
D42a7264714dee5006b9c99d2567a320

Cool! So how does that work? What does Shift+z+z actually do in Vim?

over 1 year ago ·