cm0002@lemmy.world to Programmer Humor@programming.dev · 7 days agoVim is built differentlemmy.mlexternal-linkmessage-square82fedilinkarrow-up11arrow-down10cross-posted to: programmerhumor@lemmy.ml
arrow-up11arrow-down1external-linkVim is built differentlemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 7 days agomessage-square82fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squareEndmaker@ani.sociallinkfedilinkEnglisharrow-up0·edit-27 days agoPersonally, I have seen so many memes about exiting vim that by the time I got to use it for the first time, exiting it was a no-brainer. For any newbies out there, the command is :wq
minus-squareT156@lemmy.worldlinkfedilinkEnglisharrow-up0·6 days ago:x is also an alternative to save and quit. Equally valid for the facial expression you’d make upon finding that out.
minus-squaredohpaz42@lemmy.worldlinkfedilinkEnglisharrow-up0·edit-27 days ago😳 :w = write; or overwrite if the file already exists. Please don’t give blanket destructive advice.
minus-squareGonzako@lemmy.worldlinkfedilinkarrow-up0·6 days agoThis one’s fine. They’ll then learn the next vim button, u for undo. I believe it’s saved between boots of vim? It may be my kickstarted neovim config tho
minus-squaredohpaz42@lemmy.worldlinkfedilinkEnglisharrow-up0·6 days agoI would say not in all installations, no. And honestly, it’s not worth trusting. And for those who are unfamiliar, and want to set it up: https://blog.openreplay.com/persistent-undo-vim-save-restore-history/
minus-squareElvith Ma'for@feddit.orglinkfedilinkarrow-up0·7 days agoAnd if you panicked before and fucked up the opened file while hammering on the keyboard: :q!
minus-squareBadabinski@kbin.earthlinkfedilinkarrow-up0·7 days agoThere’s also ZZ 👉😎👉 Same caveats apply, smash that fukken esc key (for bonus points rebind caps lock as esc) then ZZ Top your way out of that shit.
minus-squaremsage@programming.devlinkfedilinkarrow-up0·7 days agoThis is the most correct answer. Rebind Caps to Esc. ZZ (or ZQ if you don’t want to save the file).
minus-squareTheFogan@programming.devlinkfedilinkarrow-up0·7 days agoalso worth noting you open vim the first time, you get a huge ass splash screen telling you how to exit
minus-squareMalix@sopuli.xyzlinkfedilinkarrow-up0·7 days agoJust to add: possible need to tap esc first, as your random flailing probably put you in insert mode, or something more exotic. And only add w if you want to save the file. :q! If you don’t
Personally, I have seen so many memes about exiting vim that by the time I got to use it for the first time, exiting it was a no-brainer.
For any newbies out there, the command is
:wq
:x
is also an alternative to save and quit.Equally valid for the facial expression you’d make upon finding that out.
😳
:w
= write; or overwrite if the file already exists.Please don’t give blanket destructive advice.
This one’s fine. They’ll then learn the next vim button, u for undo. I believe it’s saved between boots of vim? It may be my kickstarted neovim config tho
I would say not in all installations, no. And honestly, it’s not worth trusting.
And for those who are unfamiliar, and want to set it up: https://blog.openreplay.com/persistent-undo-vim-save-restore-history/
And if you panicked before and fucked up the opened file while hammering on the keyboard:
:q!
There’s also
ZZ
👉😎👉 Same caveats apply, smash that fukken esc key (for bonus points rebind caps lock as esc) then ZZ Top your way out of that shit.This is the most correct answer.
Rebind Caps to Esc.
ZZ (or ZQ if you don’t want to save the file).
also worth noting you open vim the first time, you get a huge ass splash screen telling you how to exit
Just to add: possible need to tap esc first, as your random flailing probably put you in insert mode, or something more exotic.
And only add w if you want to save the file. :q! If you don’t
! If you edited the buffer at all. 👍
With random flailing, most likely