Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by PhasmaFelis on Friday October 30, 2015 @05:55PM
(#10480760)
My "favorite" thing is when you hit Ctrl-C, and Vim says "Type :quit<Enter> to exit Vim". Vim isn't dumb. It knows what Ctrl-C means, it knows what you wanted to happen. But it's gonna make you do it its way anyway, because fuck you.
[ Parent
| on HN ]
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by pizzeys on Friday October 30, 2015 @06:39PM
(#10480984)
Actually, that's a feature... Ctrl-C exits insert mode. If it quit vim when in Normal mode, you'd accidentally quit Vim all the time. Less annoying to just show a helpful message in case you actually meant quit, than dump everyone who knows what Ctrl-C does back to a shell.
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by dllthomas on Saturday October 31, 2015 @03:28AM
(#10482100)
I think more important than exiting insert mode is (as I described in a peer comment, hopefully clearly) killing foreground processes you've spawned out of vim. 1) With exiting insert mode there's the option of using escape instead (or capslock or jk or whatever people bind it to), and 2), I think most importantly, with killing processes there's an actual race condition: if the command finishes after I decide to kill it and before vim registers my Ctrl-c, exiting is totally the wrong thing to do.
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by koide on Friday October 30, 2015 @06:35PM
(#10480958)
I would think that it's because ViM wants you to learn something about how the it works.
If it just exited with Ctrl-C, you'd never get to know about the : magic.
Not to mention Ctrl-C is ambiguous. What to do: Exit and save? Exit without saving? What if it's a new file? And probably others I'm not thinking about right now.
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by pnathan on Friday October 30, 2015 @06:06PM
(#10480807)
Much like Python
Python 2.7.9 (default, Mar 1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>>