3 ms·
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
by disconnected 9y ago
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).
- falcolas 9y agoI'm guessing the multitasking capabilities of the shell are not well known to those who don't know vim. Nor how to open a separate tab session, do a `ps`, and kill that. It should be shell 101, but it's not.
- belovedeagle 9y agoNo, applications can and do trap either ^z or the signal it generates (not sure which). I'm a vi user [0] but I'm pretty sure emacs requires ^z^z to STOP. [0] autocorrect lol of the day: "I'm a vi[rgin]"
- khedoros1 9y agoemacs stops on a single ^z. You can trap it based on SIGTSTP though (Terminal SToP, a distinct signal from SIGSTOP, which I don't think can be trapped).
- belovedeagle 9y agoI guess one of my plugins steals ^Z; maybe evil-mode itself.
- JdeBP 9y agoActually, no. vim runs with the terminal in non-canonical input mode. Control+Z results in a SUB character being sent to vim. vim, in turn, knows to suspend itself when it receives that character (in visual or normal mode).