News for hackers. Stuff that matters.
Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by tomxor on Saturday January 07, 2023 @10:01AM (#34288562)
Thanks for this warning.

Even worse for me, because my laptop keyboard has some kind of horrible encoding causing latency on the shift key, so I'm constantly doing :Wq when I type fast enough... Yeah I had the suspicion it was human error - but I've tested using a single finger for shift and w, so it's definitely the keyboard.

[edit]

Looks like that feature is not necessarily built in by default though.

Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by DwnVoteHoneyPot on Saturday January 07, 2023 @10:46AM (#34289077)
i did an alias mapping :Wq to :wq
Re:Tell HN: Vim users, `:x` is like `:wq` but writes only wh... by dunham on Saturday January 07, 2023 @11:36AM (#34289666)
Yeah I do that a lot. And on macos, vi decides that :Wq is an error and returns a non-zero status code on my subsequent :wq, cancelling my git commit. So I get to type the commit message again.