3 ms·
Just don't open vim with it - there really will be no escape then.
by snthpy 1y ago
Just don't open vim with it - there really will be no escape then.
- thih9 1y agoEasy, use Ctrl-[ instead! It’s no different than pressing Esc, at least in terminal. > So even today, on Unix-like systems, applications running in a terminal emulator receive the character Ctrl-I when the user presses the Tab key, the character Ctrl-[ when the user presses Esc, etc. https://vi.stackexchange.com/a/3570 https://vi.stackexchange.com/a/3570
- btschaegg 1y agoWell, if control is missing, too… Of course, there are still more creative ways. Like :.! kill -9 $(pgrep -u $(whoami) vim)
- thih9 1y agoNot so fast, if you can do `:` (i.e. enter command-line mode) then you can do plain `:q!` - no Esc or Ctrl needed. How I understood the original problem is that you're in vim, you started editing text (insert mode) and now want to exit; but there is no Esc, so even exiting insert mode is a challenge. And now you added the constraint of missing Ctrl too, so no Ctrl-[ or Ctrl-C. If you type `:.! kill -9 $(pgrep -u $(whoami) vim)` then you just entered that as text into your document. One answer could be to use the trackball, launch a new terminal window and kill the process from there.
- btschaegg 1y agoRight, I didn't think that through… But, to note: There's another alternative that should mostly still work here, even in the absence of Ctrl: Alt-Backspace