The most viewed question is even more relatable: https://stackoverflow.com/questions/927358/how-to-undo-last-... You can get the top viewed questions here: http://data.stackexchange.com/stackoverflow/query/53109/ques...
My own personal top hit is: https://stackoverflow.com/questions/2003505/how-do-i-delete-... Pretty sure I've got the command down by now, but it's embarassing how many times I forgot the exact syntax. It was especially bad before the "--delete" syntax was introduced.
Helping a Million Developers Exit Vim
241–250 of 489 posts
Re: Helping a Million Developers Exit Vim
#242I saw the bumper sticker ":w saves" and thought, to myself I wonder how many people "get" that. I suggested a long time ago that vi/vim bind ^C to exit. It currently is equivalent to 'esc' (it puts you into command mode if you aren't there and types the message "type :quit to exit Vim". I'd much rather it popped up 'exit vim? y/n?' and the next key would determine if you exited or not.
That looks more like emacs behavior though, vim rarely (never?) prompts the user for anything. You enter a command, you get a reaction (either an action like quits vim, or a message indicating something happened) -- which I personally prefer much more than getting annoying prompts.
Re: Helping a Million Developers Exit Vim
#243Earlier quoted context omitted.
hey Linus, undo last 1 git command (as though it had never been entered): git undo 1 thanks.
I'll bet between the reflog and aliases you could do that.
Re: Helping a Million Developers Exit Vim
#244Earlier quoted context omitted.
So it actually doesn't, it's basically just a hack around the fact that the repl is basically: while True: print(str(eval(input()))) Case in point: >>> x = str(quit) >>> x 'Use quit() or Ctrl-Z plus Return to exit' I suppose you could implement quit.__str__ as sys.exit(0), if you really wanted to avoid this problem.
Whatever logic currently used to print the 'Use quit() or Ctrl-Z plus Return to exit' message could also... quit the REPL in the first place, right? I don't program Python much but do its users constantly type "quit" but not actually want to quit such that the REPL special cases this situation?
That one would probably be somewhat risky actually, that message is the "repr" of the quit object/function, displaying results at the repl invokes repr… but so does printing most containers, so e.g. `vars(__builtins__)` (to get a quick list of the builtins) would also quit the repl, which would be undesirable.
Re: Helping a Million Developers Exit Vim
#245Re: Helping a Million Developers Exit Vim
#246(Attribution is questionable, but as a geezer I feel the need to make sure the younger generations at least are familiar with this:) ed is the standard text editor Let's look at a typical novice's session with the mighty ed: golem> ed ? help ? ? ? quit ? exit ? bye ? hello? ? eat flaming death ? ^C ? ^C ? ^D ? --- Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet pruden…
http://lists.gnu.org/archive/html/bug-ed/2017-01/msg00002.ht...
Re: Helping a Million Developers Exit Vim
#247!killall -9 vim
Re: Helping a Million Developers Exit Vim
#248I spent almost 10 years doing IT for a company whose backend was based entirely on as/400. If you've ever used a system like that, I'm sure you know where this is going... The console's that the front-desk or clerical users used every day had a steep learning curve. It was something that you would definitely not be able to walk up to and just intuit. However , once you figured it out, there is never going to be a fas…
The only thing I remember being really annoyed with was that there was no way (or no way I managed to find) to select all the text in a line in one go. The same was true for the editor (EZY). I kept pressing Ctrl + V to do a block-select and pasted all sorts of gibberish all over the place. Apparently, there are no line endings in text fields so it's not possible to get something like block-selection working.
But that was about the only thing that sucked from my point of view and I grew up with GUIs and touch-interfaces, like everyone else in my generation.
Re: Helping a Million Developers Exit Vim
#249Earlier quoted context omitted.
Maybe someone should file a bug to them? I don't think vim is a sane default value for EDITOR, but I have no idea whether there's any sane alternative on Windows.
I believe POSIX defines vi as mandatory visual text editor, which makes it present on any compliant OS and thus a sane default value for EDITOR.
Re: Helping a Million Developers Exit Vim
#250Earlier quoted context omitted.
But :q and :quit does in fact quit the program. It's also the command I've been using for 20 years... Why do you think it's "wrong"?
Those are slower. ZQ is three keypresses. :q is four keypresses.