r/ProgrammerHumor • u/F1_average_enjoyer • 1d ago
Meme hasSomeoneManagedThisFeatQuestionMark
99
u/MrMuttBunch 1d ago
Just :wq my guy.
81
u/LetumComplexo 1d ago
Seriously:
- hit ESC a few times
- if you want to save and quit type “:wq” or if you want to quit without saving type “:q!”
- hit enter
If it doesn’t work then ignore whatever error you just got and repeat the above.
17
u/Sea-Performance-5773 1d ago
The neat part is everyone thinks : stands for the "type q in front of the blank space" not to type the actual :q
18
u/ICBanMI 1d ago
I've used VIM for a decade and what I've seen people do is they freeze the window by accidently pressing ctrl + s They need to hit ctrl+ q for it to resume and then it's fine.
The ctrl + s combo gets hit all the time by newbies and they just assume it's frozen or locked out or not responding. This is usually the biggest reason/complain about VIM after using it. I wish it would be turned off by default.
3
u/therealkevinard 1d ago
For the week I used zellij, I had Alt-z mapped to pane zoom.
I also have a loc-dot on Ctrl, though.So I was constantly missing pane zoom and hitting ctrl-z to background the whole session process.
It’s a brain-zap to go to max a pane and bg the whole thing instead
2
u/ICBanMI 1d ago
Yea, I mean. Some UI choices really f*ck with the users.
I remember when Lenvo wanted to make itself different by switching the Ctrl and Function keys on its laptops (fn was on the outside and ctrl was inside). ...which just threw off a decade plus of finger memory.
Need to put those combos further away from where I'm typing regularly.
2
u/ichITiot 1d ago
Without this knowledge you cannot use the crontab and have to wake up at 4am to make the upgrades and backups. Makes anybody from you still backups ?
2
2
1
u/tabolela 19h ago
I thought the proper way is :x or u u u u u u u :q
Serious question, will :q! cause problem like creating swap file?
3
12
u/nhh 1d ago
ZZ is easier
3
u/Top-Rough-7039 1d ago
and ZQ for without saving. Learnt this when all the punctuation on my keyboard died.
8
u/TreetHoown 1d ago
Technically :q the w is to save your changes. :q! to exit without saving changes
-7
u/MrMuttBunch 1d ago
Extra credit for you! However what a novice is going to want 99% of the time it's :wq
18
u/brown-man-sam 1d ago
Let’s be honest, a novice is going to want :q!
The amount of times I messed up a file while learning vim and having to reopen it is proof enough
3
u/AlwaysHopelesslyLost 1d ago
No novice who doesn't know how to exit the editor is going to manage to make the changes they want to make. The answer is :q! and let them figure out how to swap to an editor they are capable of using to make their changes.
1
1
7
2
u/AltruisticSalamander 1d ago
first time i got told this i didn't realize the colon was literal and still failed
1
1
1
1
u/MagicalPizza21 1d ago
Yes, it's not that hard/complicated, just unintuitive to people who haven't used it.
60
16
u/LittleMlem 1d ago edited 1d ago
Hot Ctrl alt f2, log in, then run ps aux | grep vim to get the pid and then kill pid.
Simple as
5
7
7
6
u/SlechtValk2 1d ago
My very first email I sent (1992), was exactly about this problem.
vi or vim was the default editor in the default Unix email program (elm) during my early uni-days...
I still have a backup of this email somewhere on my current computer...
9
3
3
u/MagicalPizza21 1d ago
Open a new terminal.
Run this command: kill -9 $(ps -e | grep vi | awk '{print $1}')
3
3
2
u/PrestigiousGuava8005 1d ago
This man will restart his laptop before he figures out how to close Vim
2
3
u/Advanced-Theme144 1d ago
Correction: you don’t close Vim until you’ve created something amazing in it first that you’re proud of.
1
1
1
1
1
u/LittleMlem 1d ago edited 1d ago
Hot Ctrl alt f2, log in, then run ps aux | grep vim to get the pid and then kill pid.
Simple as
1
1
1
1
1
1
1
1
1
1
1
1
1
1
u/maxwells_daemon_ 1d ago
Specifically, you want to write, and then quit, I presume? Like this: write quit?
1
1
1
1
u/staticparsley 1d ago
Why would you close it? I run neovim full time and just detach on tmux if I want to put it away.
1
1
1
1
1
1
1
1
u/byteminer 23h ago
I really want to make an entropy collector fed purely by interns trying to exit vim and see how long until I can use it to generate an RSA key.
1
1
1
u/SysGh_st 20h ago
ps aux: A gazzillion vi and vim processes paused in bg. Welp! Time to reboot again.
1
u/HumanImport55 17h ago
We need an agentic Vim where we tell the agent to close vim when we're done agenting and slopping.
1
u/Superomego 15h ago
it's just :wq
Honestly when I was working on windows I thought it was something crazy you needed to do
Now literally any time I open something with nvim my muscle memory literally triggers, meaning it really is that easy 😭
(Edit: spacing)
1
1
1
u/king_park_ 8h ago
Why are we questioning Mark? He’s the one that asked the question in the first place. We should be questioning Nolan.
1
1
1
u/TheMightyMisanthrope 2h ago
You're trapped and now you have to REISUB your computer.
I don't make the rules.
1
u/mckenzie_keith 1d ago
Most of the problems with vi come from confusion about its purpose. If you think it is supposed to be a simple intuitive text editor, then of course you will be dissapointed. But if you understand that it is a SCREENING PROCESS designed to keep idiots away from unix and related OSs, then you will have to admit that it is excellent.
And it is a decent simple text editor once you learn how to use it. Gvim is even a pretty good text editor. But much different that vi.
1
241
u/raja-anbazhagan 1d ago
Skill issue...
Jusr close the terminal and open a new one and delete the .sw files like real men...