ZZ for the win.
Where can I buy some of these please?
how to quit vim
- pull computer cord out of wall
Now it’s just running on battery
Would it be
q a !
?We’re just quitting without writing? Living very dangerously aren’t we?
It’s advice for how most people end up in vim in the first place.
git commit
(without -m)It is an emergency exit not a normal exit.
My initial take on the sticker was the whole “fire exit git commit git push;” I do see this other perspective now
When I accidentally edit a very important file very incorrectly and don’t know what it looked like before
The real emergency exit will leave swap files
ctrl+z, kill %1
vim something.log
esc
quit
exit
ctrl+x
ctrl+q
shushejehojwhatiwibaln):gufht;vfgs+_&f
reboot
nano something.logshushejehojwhatiwibaln
fond memories of this distro
Why would a text editor use a key like q to quit, obviously quit is <shift> + ZZ
git güd
Works as long as you didn’t put something silly in your nvim config like
vim.keymap.set("ca", "q!", "echo 'not so fast!'")
deleted by creator
I believe that’s Vim for “Beam us out, Mr. Scott”
Exit Sign
Vimer, get out!
[Esc] [Z] [Z]
ZZTop could not be reached for comment
Or just ZZ for me since I’m rarely in insert mode (I just press esc quickly after making an edit out of habit).
5 key presses to save and exit. Frickin vim.
You can use ZZ as a shortcut!
I’m pretty sure that’s close without saving changes. :wq would be needed to save.
Or 3. Hold shift, press ZZ to save and quit ZQ to quit without saving.
ZZ
ZZ Write current file, if modified, and close the current window (same as “:x”). If there are several windows for the current file, only the current window is closed.
ZQ
ZQ Quit without checking for changes (same as “:q!”).
Since people don’t seem to realize that vim has a help system: You can get to this information with
:help quit
or:help exit
four. the ! is unnecessary. how many actions are there to save and quit in other editors? ctrl, s, ctrl, w is four. move to file, click, move to save, click, move to ×, click is six.
and that’s before we replace the wq with x.
If we count the modifier keys:
Vim: esc, shift+:, w, q, Enter
Emacs: ctrl-s, crtl+x ctrl+c, or use the menu options
I use both, but find Emacs much quicker, though vim is easier to learn, though Emacs is easier while you’re learning
i’ve never had the time to get into emacs, would love to though.
also, some layouts have the : on its own key, and if you include the esc in vim commands you’re not using vim correctly :)
ESC
Surely you’re editing right before exiting, why else would you be saving?
not necessarily. you could also have done a yank-paste, or a repeated action, or had a command output into the buffer.
it’s a good habit to always leave the editor in normal mode between actions, because that makes for a cleaner edit history with smaller changesets in the undo tree.
…vim is sort of like driving stick in that way.
Yeah, having used both, my preference is for Emacs, which also comes with the bonus of menu driven ways of doing most things when you’ve been away long enough to have forgotten a keyboard shortcut. I have always needed a cheat sheet handy when away from vim for a few months
i’ve moved to helix, partly to stop myself tinkering and partly because the reversed command model is just easier. plus it has popup helpers.
Depends how you count. Both
:
and!
require shift as well.Fuck it I’m pulling the power cord
Or just ctrl-z to get out of it and “fg” to get back. :)
ctrl-z
$ killall vim
Just alt+F4, you didn’t need to edit that file anyways
yet here in trq i need to press shift in %80 of the keys (that’s why i use micro)
the annoying thing about trq is that us is the default everywhere, so you can’t press [İ] to type “i”, it’ll type a " ’ " instead >:(
similar things for “:” and “-”
deleted by creator