Keybinds (in normal mode): Shift + ZZ -> :x (save only if needed and quit) Shift + ZQ -> :q! (quit without saving)
I always preferred these over the :wq! And :q!, but for some reason seem way less popular. Most tutorials don’t even mention ZZ and ZQ.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#21If you’re learning Vim, command mode instructions are a LOT better because they actually show up on the screen.