Earlier quoted context omitted.
A sure sign of a well designed tool imo
Really? IMO that's the sign of an extremely poorly designed tool that a lot of users have learned to use very well despite how poorly it's designed. A tool that's designed well should have its actions all extremely intuitive, in which case one would not forget things in this manner because all of the actions would be derivable from their justifications. For example: ctrl+C is copy, and ctrl+V is the key right next to…
Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
241–250 of 279 posts
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#242Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#243Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#244Earlier quoted context omitted.
I use :x cus it's one less keystroke. And yes, I still use :q to make sure I don't save in case I changed something by mistake.
ZZ is only 3 keystrokes as opposed to 4 for :x (shift + z + z = 3 and shift + ; + x + enter = 4). It also doesn't require timing the release of shift before the press of x.
EDIT: Just tried it, and Z being right next to Shift is a deal breaker.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#245Earlier quoted context omitted.
Or, as other have pointed out, just use `ZZ` which is even easier and equivilant to `:x`.
:wq just makes more sense to me, it’s “command: write, quit” ZZ is just.. random?
I also think the bikeshed should be lime green :)
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#246Maybe it's just me, but I find :wq a lot easier to type... For :x (or worse, ZZ), I either have to move my hand or bend my ring finger/pinky to reach the keys. On the other hand, my fingers reach both w and q at the same time with very little effort.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#247I learned to do `:wq` after I learned that `:X` encrypts your file. When typing without really paying attention to the screen, I've twice encrypted my file with password like `cd tmp`, then saved the config file, breaking my system. After 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
#248See, that's why even though I'm a terminal user first and foremost, I really like the discoverability of GUIs, and that's where a good GUI is unbeatable by CLI. This would have just been an entry "Save if needed" in the File menu, right below "Save", and users would probably find it by accident while looking at the menu, even while not actively looking for new ways to save a file. (Not getting into the fact that a we…
It saves automatically when you press compile or change focus to another window. This is how both VSCode and Intellij work. Together with a local history that allows you to go back in time to any point earlier during the day.
Writing things in stone or reverting to older state is something reserved for git.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#249This is the first time my life has changed from just reading a Hacker News headline.
Have you learned about "ZZ" yet?
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#250Earlier quoted context omitted.
ZZ is only 3 keystrokes as opposed to 4 for :x (shift + z + z = 3 and shift + ; + x + enter = 4). It also doesn't require timing the release of shift before the press of x.
Wow! Never knew that existed. If I can undo 20 years of muscle memory, I'll use it. :D EDIT: Just tried it, and Z being right next to Shift is a deal breaker.