This is the first time my life has changed from just reading a Hacker News headline.
Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
51–60 of 279 posts
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#52See, 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…
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#53See, 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…
A menu? WTF is that? Some sort of out-dated ui element no doubt.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#54I 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.
Yeah, thanks for this. `:wq` is pretty fast to write. I think I will stick to it.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#55I 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.
I'm toying with either disabling it,
cmap X
or, mapping it down to a lower x. cmap X x
1. Does anyone see anything this could interfere with?2. Does anyone know a better way to turn off the `:X` encryption option?
Sadly, having to remap definitely dulls the shine of `:x`.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#56This solves the problem mentioned by OP because I can just `:q` anytime.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#57Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#58Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#59See, 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…
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#60I learned early on that the easiest way to quit Vim without saving was ctrl-Z and then kill -9 %1