this post was submitted on 25 Oct 2023
2328 points (99.2% liked)

Programmer Humor

35331 readers
185 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

I'm trying out Obsidian for taking notes, and this made me laugh.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 32 points 2 years ago (2 children)

There's a few different ways to write that command in vim, does it accept all of them?

[–] [email protected] 17 points 2 years ago (4 children)

I'm honestly not super familiar with vim. I tried :q! and it accepted it, what are some other ways?

[–] [email protected] 15 points 2 years ago (5 children)
[–] [email protected] 29 points 2 years ago (1 children)
[–] [email protected] 7 points 2 years ago (1 children)

Halfway true :3 I'm only a professional programmer which is why I attend in professional work fashion like thigh highs and arm warmers instead of fursuits. I'm more the stereotypical femboy programmer. Pre-edit: am i really just average 3,:

[–] [email protected] 2 points 2 years ago

Okay, you are a very cool and sweet femboy programmer :)

[–] [email protected] 8 points 2 years ago

Ah, unfortunately it only asks you this question the first time you try it.

[–] [email protected] 1 points 2 years ago* (last edited 2 years ago)

E37: No write since last change (add ! to override)

[–] [email protected] 14 points 2 years ago (1 children)
[–] [email protected] 8 points 2 years ago

Ah, thanks for ZQ. I only knew ZZ, alternative to :x.

[–] [email protected] 11 points 2 years ago
[–] [email protected] 8 points 2 years ago (4 children)

: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:-)

[–] [email protected] 17 points 2 years ago

The question specifically asked for "the command to quit Vim without saving"

[–] [email protected] 8 points 2 years ago (1 children)

They explicitly ask for the one that quits without saving, so I'd say :q! is the obvious choice

[–] [email protected] 1 points 2 years ago

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

[–] [email protected] 6 points 2 years ago

Which means none of those are valid? Since this is specifically "quit without saving"

[–] [email protected] 3 points 2 years ago
[–] [email protected] 6 points 2 years ago* (last edited 2 years ago) (1 children)

No, I tried ZQ the other day, does not work

[–] [email protected] 3 points 2 years ago

my disappointment is immesurable and my day is ruined.