this post was submitted on 15 Apr 2026
882 points (98.4% liked)
Programmer Humor
31064 readers
2296 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Why :wq doesnt work?
If it’s a read only file it won’t work, but it might be in insert mode and can’t escape.
It should have tried :q!
I think it might not be vim.
Why?
It's started something on a terminal. It is assuming it's vim, but it's not operating like vim. I'm questioning it's assumption. If it had fired up nano, for example, sending vim key sequences isn't going to work. Seeing as it seems to be doing stuff with git too, it may not have started this editor explicitly. It will be using whatever git is configured to use.
Oh, ok yah. It might not be vim. It could literally be anything. I just thought I'd missed something
Could be in recording mode, which usually needs a couple ESC or a Q then you can :wq
You mean EX mode? IIRC recording mode doesn't prevent exiting vim
Ah just looked up EX mode. Didn't know capital Q entered a different mode, I just wrote "Q" to emphasize the key in general not capital Q specifically lol.
Personally I love vim, it's just powerful enough for me for my bash scripts. Anything more complicated then I'm using a proper IDE or something more simple I'm using Kate or whatever graphical editor for my DE.
Nah, just looked it up. Recording mode is activated by pressing "q" and allows you to record your inputs for a macro. So if you forget to do ":" and just press "q" you'll enter Recording mode and have to press "q" again to exit Recording and then you can do ":q" or whatever you needed.
But if you don't know what you pressed and don't know how to exit Recording mode then you'll be stuck. I've seen coworkers get stuck in this from time to time.
We're a RHEL shop so our vim version may be different, but Recording mode doesn't let us exit vim directly, we have to exit Recording mode and then exit vim. Again, might just be our setup.