News for hackers. Stuff that matters.
Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by isbjorn16 on Saturday January 07, 2023 @01:34PM (#34291030)
I think their point is sometimes their left pinky is a bit lazy and won't get off the fucking shift key
Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by raydiatian on Saturday January 07, 2023 @02:44PM (#34291846)
I’ve been a vim (and :x) user for about a decade, and have never once faced this issue. I don’t think I’m a particularly exceptional person, so I tend to suspect my experience isn’t far from average.

In any case, if you’re using vim or the like to edit files without buffering, source control, or backup, I get that it sucks but that footgun had your name on it from the start.

Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by ajford on Saturday January 07, 2023 @02:50PM (#34291912)
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.

Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by raydiatian on Saturday January 07, 2023 @03:47PM (#34292604)
What parent @waisbrot is saying seems uncommon (the source of this whole conversation), but granted, perhaps common enough (or is it instead worrisome enough) that nvim community took it out.

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 wh... by mega_dingus on Saturday January 07, 2023 @04:11PM (#34292857)
OP said exactly "I've twice encrypted my file with password like `cd tmp`"

Not sure how you get "irrevocably bricked your system" from "encrypted my file", but you do you, I guess

You should also let the OP do the OP. They said they made a mistake. Simply, without complaining, and they do something else now. It's that simple

Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by raydiatian on Saturday January 07, 2023 @04:42PM (#34293173)
Parent (not OP) said more exactly

> I've twice encrypted my file with password like `cd tmp`, then saved the config file, breaking my system.

I get “irrevocably bricked system” from the fact that they “broke their system” and I am inferring it could only be something worth mentioning if it were irreversible.

I originally was trying to point out that parent was off-topic, because :x and :X are different. But a fleet of downvotes flooded in, so I defended my viewpoint for the catharsis.

Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by isbjorn16 on Saturday January 07, 2023 @02:57PM (#34291989)
Me either, but that's because I type `:wq!` every single time instead. I'm not one of those who is afraid of typing more than a single character so I don't care if it's actually 3 I'm hitting. I am someone whose entire brain comes to an absolute crash if I type "wq" and it's asking me if I want to save over a RO file. It's like having a belt loop or pocket catch on a door handle and I despise it.

So, `:wq!`, or as I call it "write the fucking file and quit, _with feeling_"

Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by an-honest-moose on Saturday January 07, 2023 @02:57PM (#34291995)
The only reason the footgun is there is because vim put it there. Seems reasonable to me to be frustrated by that.
Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by raydiatian on Saturday January 07, 2023 @03:34PM (#34292444)
Then upgrade to nvim like everybody else idk
Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by jgb1984 on Saturday January 07, 2023 @03:58PM (#34292701)
Some people value stability and gvim. I don't consider nvim an upgrade, it's just a fork with different priorities which may or may not suit you. I continue to use vim and gvim.
Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by avbanks on Saturday January 07, 2023 @04:18PM (#34292930)
The one gripe I gave with neovim is the stability.