vim something.log
esc
quit
exit
ctrl+x
ctrl+q
shushejehojwhatiwibaln):gufht;vfgs+_&f
reboot
nano something.log
post
how to quit vim
- pull computer cord out of wall
Works as long as you didn't put something silly in your nvim config like
vim.keymap.set("ca", "q!", "echo 'not so fast!'")
We’re just quitting without writing? Living very dangerously aren’t we?
It is an emergency exit not a normal exit.
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
My initial take on the sticker was the whole “fire exit git commit git push;” I do see this other perspective now
It's advice for how most people end up in vim in the first place. git commit (without -m)
[Esc] [Z] [Z]
Or just ctrl-z to get out of it and "fg" to get back. :)
You all exit your editor? How you do the rest of your computing?
/s with ♡ from an Emacs fan.
yet here in trq i need to press shift in %80 of the keys (that's why i use micro)
5 key presses to save and exit. Frickin vim.
I’m pretty sure that’s close without saving changes. :wq would be needed to save.
To be precise, : means bring up commands, w means save, q means exit, and ! means force
I think it's w = write and q = quit so the letters make more sense
Also :x is the same as :wq
Why would you want to write again if no changes were made? It's some obtuse behavior
To be more precise, q means quit the current window. If you've split the window, e.g. with :split or :vsplit, use :qa to quit all windows.
Or 3. Hold shift, press ZZ to save and quit ZQ to quit without saving.
ZZZZ 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.
ZQZQ Quit without checking for changes (same as ":q!").
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 :)
Without saving? Bold move.
Its vi. When I use it, I always fuck something up and get tangled up in knots. Best to just bail out and try again later.
Are you going to save without knowing what changes were made? Bold move.
That's the people who use vi to view a file. Watched a guy almost get fired when he shared his screen during an audit and had 'sudo vi /etc/shadow' right there in the command window. Auditor saw it and called him on it. He swore that he was only viewing the file to look for a user's id, but the auditor didn't care, because he could have modified it either on purpose or by accident.
Every time

top 47 comments