Remix.run Logo
marttt a day ago

I've long quit using vim on a daily basis, but the "how to exit Vim?" jokes are still somehow funny. A recent encounter was an old tweet by @iamdeveloper: "I've been using Vim for about 2 years now, mostly because I can't figure out how to exit it."

:wq (sorry, I had to).

pjio a day ago | parent | next [-]

Quitting vim isn't about exiting the program, which can easily be done with :!kill -9 $PPID

__MatrixMan__ 17 hours ago | parent | next [-]

Quitting vim became easy once I got to know helix. I've been clean for several weeks.

eddd-ddde 5 hours ago | parent [-]

You should check out kakoune! It's very similar to helix, motion first, multi selection, and stupid easy to script.

marttt 17 hours ago | parent | prev | next [-]

Easy-peasy!

tylerchilds 21 hours ago | parent | prev [-]

i quit vim like

ctrl-z

Jenk a day ago | parent | prev | next [-]

`ZZ` to save and quit, `ZQ` to quit without saving. Sorry, I can't help myself.

Brian_K_White a day ago | parent | next [-]

I've always used :x or :x! and no longer remember why. Probably it's a bad idea like without actually looking right now I think it might mean to ignore permissions (if you're root enough) and just write even if perms would have blocked it. Hm, maybe x means wq and just the ! means force.

mklein994 a day ago | parent [-]

It's actually a bit more nuanced: `:x` is like `:wq`, but only writes if changes have been made. `:x!` has the same semantics as `:wq!`.

BoiledCabbage a day ago | parent | next [-]

The fact that everyone says the meme is dead, but in this small thread there are 5 different people posting how to exit, and none of them are the same says there is still pretty good substance behind that meme.

Brian_K_White 20 hours ago | parent [-]

I think we're all kind of implicitly acknowledging the truth of the meme. I mean that was definitely a conscious part of my own comment.

humanperhaps a day ago | parent | prev [-]

I feel like the default behavior should be to not write unless changes have been made. I may be misunderstanding here, but what would be getting written if nothing's been changed?

johannes1234321 a day ago | parent | next [-]

It would overwrite changes made by external programs.

greiskul a day ago | parent | prev [-]

Metadata about the file like modification time.

entelechy0 a day ago | parent | prev [-]

[dead]

EFreethought 4 hours ago | parent | prev [-]

I think sysadmins should install nano on servers for people to make quick edits. All the commands are along the bottom, so there is no learning curve.

onetom 12 minutes ago | parent [-]

or they should just make sure emacs can work with the machine thru ssh, then there is nothing to install ;)

if no ssh, then nano is not a bad option, though i would go with joe (https://joe-editor.sourceforge.io/) which can also show the shortcuts, but much much more powerful, yet it's just a single ~700kbyte exe (or 1.5MB with some optional syntax highlighting grammars and docs)