"Quit all" one-handed by mapping :qa to ZA, analogous to builtin ZZ and ZQ

2 Points

Kazark Kazark

9 years ago

The normal command ZZ is equivalent to the command-mode command :x, and likewise ZQ is equivalent to :q!. In the spirit of these mappings, it would be nice to have one that is mapped to :qa. This is useful, for example, when you are reviewing changes in Git using Vim to do diffs. Most of the time you aren't going to be typing and changing stuff; you're just looking at the code. Therefore your hands might not be on the keyboard the whole time, or it might be nice to just have one hand on the keyboard. Whereas :qa is a two-handed command, ZA is one-handed.

nmap ZA :qa<CR>