Re:Helping a Million Developers Exit Vim
by theandrewbailey on Tuesday May 23, 2017 @02:08PM
(#14403630)
That's the point. That behavior is contrary to the expectation. Ctrl+C should not display a message: Ctrl+C should quit immediately.
[ Parent
| on HN ]
Coming from the Windows world, I am happy that Ctrl+C doesn't make assumptions and quit. Imagine attempting to copy something and having your file close without warning.
You can intercept Ctrl+C on Windows just as well and do nothing, or something different than quitting.
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.
Here's the problem: Ctrl-C isn't quit. It's keyboard interrupt, and that does not necessarily mean "quit".
Ironically, in vim, where the terminal is in non-canonical input mode when vim is in the foreground, it is not keyboard interrupt. (Nor is it in most modern shells, which also use non-canonical input mode in their command line editing mechanisms.)
Re:Helping a Million Developers Exit Vim
by bryanlarsen on Tuesday May 23, 2017 @02:12PM
(#14403671)
On many editors ctrl-c is the copy key. Not a good key to exit on...
It's the other way around - mapping copy to ctrl-c was a bit stupid...
Yep. Apple got this one right with the Cmd key. Much saner than the context-dependent hijacking of the control key with its long-established conventional usage.
Re:Helping a Million Developers Exit Vim
by bryanlarsen on Tuesday May 23, 2017 @04:07PM
(#14404790)
Very true, but that argument was lost over 20 years ago.
Re:Helping a Million Developers Exit Vim
by chrisweekly on Tuesday May 23, 2017 @02:55PM
(#14404089)
CTL-C, or CMD-C?