In the opposing vein, as an Emacs user the best configuration I ever made was to rebind C-x C-c to execute-extended-command instead of kill-emacs. It was way too easy to (even accidentally!) kill emacs with a sweep of a finger. And I probably use a few hundred execute-extended-command calls for each kill-emacs (which I now have to type manually as 'C-x C-c kill-emacs' - no problemo). A similar optimisation was with t…
How do you exit, then, if you never learned :q?
How to Exit Vim
291–300 of 409 posts
Re: How to Exit Vim
#292As the old joke says[1]. ED(1) Unix Programmer's Manual NAME ed - text editor SYNOPSIS ed [ - ] [ -x ] [ name ] DESCRIPTION Ed is the standard text editor. [1] https://www.gnu.org/fun/jokes/ed-msg.html
I've written the following one-liner if ed(1) is unavailable on your system, to emulate its functionality: trap 'echo -e "\n?"' INT; while true; do read; echo "?"; done
Re: How to Exit Vim
#293Very clever, but I wish they would put the real way, which, for the record, is :q at the top so that this doesn't annoy people who legitimately google it and have to wade through this.
But any of the other methods work just as well
Re: How to Exit Vim
#294Re: How to Exit Vim
#295Re: How to Exit Vim
#296Earlier quoted context omitted.
git will open pico if you haven't configured an editor. It's annoying. If you have configured an editor, hopefully you already know how to quit.
It has to open something, and pico/nano, at least, has a menu that tells you how to quit. What else would be a preferable default?
Another option would be to fail and prompt the user to configure an editor preference. That wouldn't be much different (to me) than what it does now.
Re: How to Exit Vim
#297Earlier quoted context omitted.
I think that's a great suggestion and probably gets the root of the whole exit vim meme.
I don't have a qa key though
Re: How to Exit Vim
#298Very clever, but I wish they would put the real way, which, for the record, is :q at the top so that this doesn't annoy people who legitimately google it and have to wade through this.
Re: How to Exit Vim
#299Earlier quoted context omitted.
Did you save any?
Yes, I was able to save the file using ZZ rather than :w It's been a long time, but I was probably hung up on not being able to experimentally figure out : commands, where I was able to figure out control-z and ZZ.
Re: How to Exit Vim
#300Very clever, but I wish they would put the real way, which, for the record, is :q at the top so that this doesn't annoy people who legitimately google it and have to wade through this.
This page is well at the bottom of the first results page, and vim tells you how to exit it now when you try things like ctrl+c. I don't think anyone is in danger. https://i.imgur.com/b6dqBiV.png
It's at the bottom now, yes, but if this (and copycats) takes off, it won't be. I've seen cases where the search results get so dominated by oh-so-clever parodies that are mixed in with legit answers that you can't tell which is which.
>vim tells you how to exit it now when you try things like ctrl+c.
Which is great, if that version of vim universally replaced all the others, and every newbie was aware of ctrl-C.
For context: in 2011, I tried the project Open Hatch, specifically designed for newbies, and if you followed their tutorial instructions, you could get dumped into a vim terminal with no idea how to get out.
>I don't think anyone is in danger.
With respect, I'd suggest updating your criteria for making this judgment.