this post was submitted on 25 Oct 2023
2263 points (99.1% liked)
Programmer Humor
31800 readers
309 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
:wq will save and then exit, while :x will save only if the file has been modified and then exit, and then there's ZZ that does the same as :x, plus there are probably others:-)
The question specifically asked for "the command to quit Vim without saving"
They explicitly ask for the one that quits without saving, so I'd say :q! is the obvious choice
I agree that it's the most obvious choice, but it also doesn't work when there are hidden buffers open. :qa! and :cq should always work so they are arguably more correct
Which means none of those are valid? Since this is specifically "quit without saving"
This guy vims