Earlier quoted context omitted.
I have computer-literate parents and grew up in the PC era, so as a child I typed my elementary school assignments in vi. Accidentally using :X, encrypting one of my school papers, and having to completely rewrite it, was one of the slightly-traumatizing moments in my childhood. FWIW, I switched to :wq for a while but I'm back to using :x instead of :wq. I'm just very careful now. :)
I get annoyed by ":W is not a valid command" errors and aliased it, and that's not even dangerous to get wrong, just have to retype ":w". Why be so careful instead of just aliasing it? vimrc excerpt: command Wq wq command WQ wq command W w command Q q command Bd bd cnoreabbrev q1 q! I hate having to get the shift key timing correct so much that I also aliased : to ; for commands, but that's more radical and gets me i…
Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
201–210 of 279 posts
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#202Earlier quoted context omitted.
> You can also type ZZ (no colon) while in normal mode to exit and save. That's insane. What if you need to type the following words in all caps? DRIZZLE GRIZZLY BUZZARD PIZZAZZ The last would make that command from normal mode particularly annoying. Unless you meant when not in input mode... duh.
Normal mode in vim does not have the meaning normal people associate with a normal text editor.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#203Earlier quoted context omitted.
[dead]
I've been a vim user for 15 years and I still often type `:Q` and `:W`. Everyone types differently and some people make mistakes. Your blaming the victim instead of the software.
I still type :Q and :W as well, but that is not what is being discussed.
Have you ever irrevocably bricked your system, as @waisbrot mentioned they have twice, from typing :W or :Q? Have you ever bricked your system from typing :X? If so, that isn’t a “use :x vs :wq” problem, that’s seems more of a use common sense problem.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#204Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#205Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#206Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#207Earlier quoted context omitted.
The only reason the footgun is there is because vim put it there. Seems reasonable to me to be frustrated by that.
Then upgrade to nvim like everybody else idk
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#208Earlier quoted context omitted.
What do you mean? Super easy and fluid, I've been doing it for about a decade. Left pinky on left shift, left middle finger (you could try ring I suppose) on zz, tap twice.
I mean pretty much what I wrote. It's literally the most difficult thing I've ever typed on a keyboard. Blame my hand geometry or the keyboard or muscle memory or 10,000 other things, I just noted it was super hard and unnatural for me to type that. (The downvoting on that is pretty epic, though.)
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#209Earlier 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…
An example of this is that new users often expect conventions they're used to; and both vim and emacs predate a lot of these, like Ctrl-S for saving.
Muscle memory can also be a sign for poorly designed software, where simple actions require a lot of repetitive steps. At least, it's easy to go fast with a keyboard. As an example, I learned by heart some sub-sub-menu items in Cadence, accessed by Alt+x,y,z (I'm thankful for these underlined letters in toolbars).
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#210Earlier quoted context omitted.
Same. Been using :x for about 20 years. Had no idea there was some similar encryption nonsense.
I've been using `rm` and `rm -rf` for as long without losing data, but I understand why some people like having a trash can. Different workflows are susceptible to different hazards.