Shift + ZZ -> :x (save only if needed and quit)
Shift + ZQ -> :q! (quit without saving)
Shift + ZZ -> :x (save only if needed and quit)
Shift + ZQ -> :q! (quit without saving)
Compare vim or its clones with any KDE application, which always has keybindings shown in menus, and always a complete list of rebindable keybindings in the settings menu.
https://vimdoc.sourceforge.net/htmldoc/usr_02.html#02.7
To exit, use the "ZZ" command. This command writes the file and exits.
I remember reading about it 17 years ago in this manual. Tbf, it could have been in another section back then, but that is no excuse for seeking some “easy” tutorials instead of R-ing the TFM. There must be a name for this syndrome when people look for documentation and learning materials in anywhere but the documentation and the learning materials.
A possible correct solution is already given as an example in my previous post.
Granted, it would be nice to see more apps using the solution you described. But personally I don’t find a list of commands in a table that much different from a list of commands in a text wrt discoverability.
Another nuance discussed here https://news.ycombinator.com/item?id=34287407#34293277
That’s a real “geez, our keymap is almost exhausted!” keybind.
And actual advantage here is that `ZZ` can be your "quietly quit anything" key. It'll close quickfix, locationlist, previewwindow, etc without complaining.
Shift + ZA -> :up (save only if needed without quitting.)
by adding to your .vimrc:
nnoremap ZA :update<CR>