Live data from Hacker News

Helping a Million Developers Exit Vim

stackoverflow.blog

131–140 of 489 posts

Re: Helping a Million Developers Exit Vim

#131

(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…

After reading lots of similar anecdotes about Ed (Steven Levy's "Hackers" dedicates quite a few words to it), I was quite sure it was pretty much unusable for today's UI patterns, but also morbidly curious about how it might eventually work.

Then I came across "Actually using ed"[1], which did such a great job at explaining how to use the tool that I decided to throw in my 2 cents by submitting an entry to the tldr-pages project[2]. The rendered page looks can be found on [3]. Any feedback welcome!

1. https://sanctum.geek.nz/arabesque/actually-using-ed/

2. https://github.com/tldr-pages/tldr/pull/944

3. https://github.com/tldr-pages/tldr/blob/master/pages/common/...

Re: Helping a Million Developers Exit Vim

#133

I'm somewhat amazed but mostly amused that the Vim developers care so little about user experience that they continue to ignore that people have trouble with exiting their tool and refuse to adapt to a more expected convention for exiting it.

So much whining on this thread...

Want to quit vim? How's about:

1- Hit ctrl-z

2- Type "kill -9 %"

3- Hit enter

Result: dead vim. Heck, dead anything that was previously on the foreground.

This works with emacs, vi, nano, and, I guess pretty much everything, since ctrl-z is captured by the shell and never gets sent to the application (I think).

Re: Helping a Million Developers Exit Vim

#134

Earlier 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.

I'm requesting the exact syntax I just wrote.

EDIT: the replies to this don't get how feature requests work. yes, I could write this basic feature myself. thanks.

Re: Helping a Million Developers Exit Vim

#135
post #12

Earlier quoted context omitted.

It literally everytime you boot the first screen tells you how to quit and get help. So..read the screen that comes up Everytime? If you try Ctrl c it tells you it's :q.

That's the point. That behavior is contrary to the expectation. Ctrl+C should not display a message: Ctrl+C should quit immediately.

Here's the problem: Ctrl-C isn't quit. It's keyboard interrupt, and that does not necessarily mean "quit".

Re: Helping a Million Developers Exit Vim

#136
post #12

Earlier quoted context omitted.

It literally everytime you boot the first screen tells you how to quit and get help. So..read the screen that comes up Everytime? If you try Ctrl c it tells you it's :q.

That's the point. That behavior is contrary to the expectation. Ctrl+C should not display a message: Ctrl+C should quit immediately.

How many interactive programs actually close immediately if you hit CTRL+C? Why would you expect that of vim?

If nano were the editor you end up in, you would have the same problem.

Re: Helping a Million Developers Exit Vim

#137
post #75

Isn't that exclusively used by middle aged computer scientists?

Yes, it takes experience and wisdom to upgrade to using Emacs. Besides, won't every currently young computer scientist be a middle aged computer scientist soon enough?

It takes wisdom to realize that the genesis of universe lies within parenthesis.

Re: Helping a Million Developers Exit Vim

#138

I'm somewhat amazed but mostly amused that the Vim developers care so little about user experience that they continue to ignore that people have trouble with exiting their tool and refuse to adapt to a more expected convention for exiting it.

Troll, don't feed it.

Re: Helping a Million Developers Exit Vim

#139

That's funny because I feel that exiting vim is easy. On the other hand, exiting from nano is a nightmare and makes no sense to me - To make matters worse, it's difficult to find info online because it's hard to explain nano's confusing interface with keywords. I hate how git made nano the default editor on Ubuntu. Every time I install git, I have to remember to change the configs to use vim as the default.

Maybe I've taken some crazy pills recently but I thought nano displayed the hotkey to exit on the screen.

Actually it's exiting when you have unsaved changes which is confusing, the second prompt that comes up makes no sense to me. Also it shows a caret ^ character to represent the ctrl key which is confusing.

Re: Helping a Million Developers Exit Vim

#140

I 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.
Post reply on HN