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.
Written by Abhishek Das
Related protips
2 Responses
There is also alternative command :x. ZZ shortcut is nice, but I have some written on my own:
-
ZX- mapped to:cqwhich quits with error (useful when dealing with Git) -
ZA- quit all without saving (:qa) -
ZS- quit all with saving (:xa)
over 1 year ago
·
Cool! So how does that work? What does Shift+z+z actually do in Vim?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Terminal
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#