3 ms·
Yeah, I mean if you really wanted to help people exit Vim you'd trap Ctrl-c in command mode and print the instructions at the bottom of the screen. Something a
by Lio 7y ago
Yeah, I mean if you really wanted to help people exit Vim you'd trap Ctrl-c in command mode and print the instructions at the bottom of the screen.
Something along the lines of "Type :qa and press <Enter> to exit Vim" would probably do it...
- PandaWhisperer 7y agoAt this point, learning how to exit vim by yourself is just standard hazing practice for new devs. It's not a bug, it's a feature.
- Kye 7y agoThis kind of advice confused me early on because I didn't realize the : was part of the command for way too long. For beginners, you might want to spell it out further as: "shift and the : key, then qa, then Enter"
- fourthark 7y agoYes, the version on my machine prints Type :qa! and press <Enter> to abandon all changes and exit Vim
- JdeBP 7y agoYou're only targetting old 1970s terminal users, there, though. If you wanted to also help slightly more modern users who are used to CUA conventions from GUIs, you would have the [F1] key bring up some form of help screen, which said something like "Get out of Vim: Use :qa!" at the top.
- Kerrick 7y agoYou're only targeting old 1990s GUI users there, though. If you wanted to also help silghtly more modern users who are used to discoverable-UI conventions from mobile apps, you would have it so shaking your device brings up some form of chat bot, which would suggest asking it how to quit Vim.
- JdeBP 7y ago1980s. [F1] is CUA 1987. And one of these ideas is not like the others. Clippy, please tell everyone how Lio's and my if-only-VIM-did-this ideas are different to Kerrick's idea.