Earlier quoted context omitted.
In neovim, :X (and cryptography in general) is removed https://github.com/neovim/neovim/commit/85338fe
Thanks great link. tldr: > vim encryption uses old, obsolete algorithms that are poorly implemented. Since insecure cryptography is worse than no cryptgraphy, the community voted in favor of removing all crypto.
Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
221–230 of 279 posts
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#222Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#223Earlier quoted context omitted.
If only! I was a TA for an introductory CS class that taught C++ and, in passing, vi. A hour before one assignment was due, a student showed up in a panic. “I just had it working but then the computer corrupted my file. Look! Can I have an extension?” The other TA and I smirked: What a lame excuse! We offered some generic advice about starting earlier and visiting office hours. He left in a huff. A few minutes later,…
[flagged]
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#224See, 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…
No, the command would simply not exist because having so many commands would take up too much screen space.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#225Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#226Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#227Earlier 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…
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#228Earlier quoted context omitted.
Thanks for bringing this up. 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`.
Mapping to 'x' is dangerous since on a system where you don't have your vimrc you'll get the original behavior of 'X'. Ideally you'd map 'X' to deliver a small electric shock. ;-)
cmap X x
:help X
> Mapping to 'x' is dangerous since on a system where you don't have your vimrc you'll get the original behavior of 'X'.Which is still to prompt? A person could take their chances.
Besides, wouldn't that form of intentionally aversive conditioning actually boost the learning rate and create hyperassociations to the behavior your're attempting to stimulus extinct or just learn over?
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#229Why would it write if no changes have been made?
Vim is from an era when software was written to do exactly what you commanded it, not what you intended. It was your responsibility as a user to learn how to turn your intentions into commands.
Nevertheless there are such thing as adding a confirmation message in case of a dangerous operation (and, if necessary, and option to disable such warnings). For example, C compilers usually have warnings, and you can disable any warnings that you do not want.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#230I 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.