Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
31–40 of 279 posts
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#32Keybinds (in normal mode): Shift + ZZ -> :x (save only if needed and quit) Shift + ZQ -> :q! (quit without saving)
That’s a real “geez, our keymap is almost exhausted!” keybind.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#33Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#34I only knew about :x. So thus far I’ve only edited with :x, and then used :q! to quit without writing the changes.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#35After that, I switched to `:wq` (and sometimes `:w` `:q`) which is much safer against over-typing.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#36Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#37Shift Z Z will instantly save and exit, same as wq!
I just tried this and I think that in 40ish years of typing on computer keyboards, this is the most difficult thing I've ever typed. And I use emacs.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#38Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#39Keybinds (in normal mode): Shift + ZZ -> :x (save only if needed and quit) Shift + ZQ -> :q! (quit without saving)
> Shift + ZZ That’s a real “geez, our keymap is almost exhausted!” keybind.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#40Why would it write if no changes have been made?
So most people do :wq so that it saves and then quit or do :q! to quit without saving changes. Most people stop using :q.