cm0002@lemmy.world to Programmer Humor@programming.dev · 15 hours agoVim is built differentlemmy.mlimagemessage-square76fedilinkarrow-up1389arrow-down110cross-posted to: programmerhumor@lemmy.ml
arrow-up1379arrow-down1imageVim is built differentlemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 15 hours agomessage-square76fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squareEndmaker@ani.sociallinkfedilinkEnglisharrow-up26arrow-down2·edit-214 hours 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-squaredohpaz42@lemmy.worldlinkfedilinkEnglisharrow-up10·edit-210 hours ago😳 :w = write; or overwrite if the file already exists. Please don’t give blanket destructive advice.
minus-squareGonzako@lemmy.worldlinkfedilinkarrow-up2·8 hours 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-up1·5 hours 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-squareMalix@sopuli.xyzlinkfedilinkarrow-up22·13 hours 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
minus-squareTheFogan@programming.devlinkfedilinkarrow-up13arrow-down1·13 hours agoalso worth noting you open vim the first time, you get a huge ass splash screen telling you how to exit
minus-squaredohpaz42@lemmy.worldlinkfedilinkEnglisharrow-up1·10 hours agoOnly if you don’t immediately open a file.
minus-squareElvith Ma'for@feddit.orglinkfedilinkarrow-up4·11 hours agoAnd if you panicked before and fucked up the opened file while hammering on the keyboard: :q!
minus-squareBadabinski@kbin.earthlinkfedilinkarrow-up5·12 hours 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-up2·10 hours agoThis is the most correct answer. Rebind Caps to Esc. ZZ (or ZQ if you don’t want to save the file).
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
😳
: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/
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
also worth noting you open vim the first time, you get a huge ass splash screen telling you how to exit
Only if you don’t immediately open a file.
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).