See, 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…
Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
91–100 of 279 posts
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#92Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#93I 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.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#94I 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.
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 when changes are made
#95See, 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…
programs like vim and tmux desperately need a menu which just shows all available commands (including plugins), even if it’s opt-in. AFAIK no such menu actually exists in vim or neovim because of the way some of the commands are hard-coded
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#96Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#97Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#98Never liked ":wq" construct since I started to use vi, almost three decades ago. Always used ":x". Now realizing, it had a hidden benefit. Good for me.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#99I 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.
Re: Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
#100This is the first time my life has changed from just reading a Hacker News headline.
Make sure to see this comment about :X encrypting your file instead of exiting https://news.ycombinator.com/item?id=34288446
\s
Been using :x from the start about 4 years ago and I never accidentally encrypted a file.