5 ms·
Imagine you don't know that. Now try to exit vim.
by gtsteve 9y ago
Imagine you don't know that. Now try to exit vim.
- ashark 9y agoAdd in the bonus confusion that you may not have even been trying to run vim, and in fact may not know what it is (hey, everyone's a beginner some time), but have landed there due to a default $EDITOR value. [EDIT] also, a typical mid-level computer user's tendency to slap "ESC" when panicked. Ha!
- fishywang 9y agoWhich OS/Linux distribution set default $EDITOR to vim? Personally I've never seen one, and I don't think vim is a sane default value for $EDITOR.
- recursive 9y agoDon't know about $EDITOR, but if you issue a git commit in Windows, and forget to specify -m, then you end up in vim.
- dom0 9y agoI dunno if it's actually vim or some variation on it, but it is the default on, for example, Arch Linux, although I believe most other distros dropped me into it as well (e.g. git commit / rebase -i). If there is such a thing as user hostile in the world of CLI tools, then dropping the user unannounced into vi with some open buffer most definitely counts as user hostile.
- 0xFFFE 9y agoIn Jessie, visudo lands you in nano, unless you explicitly set the $EDITOR.
- JdeBP 9y agoWhat are your thoughts on $VISUAL?
- bbcbasic 9y ago> you may not have even been trying to run vi git rebase -i For example
- tcoff91 9y agoOk, so anyone with any terminal experience but no vim experience would press <ctrl>-c. Then, the program tells them "Type :quit<Enter> to exit Vim" And if the user is capable of reading, they shouldn't have any problem. If they don't know about ctrl-c, they shouldn't be using a terminal editor.
- dsp1234 9y agoE37: No write since last change (add ! to override)
- zero_iq 9y agoTry actually following those instructions. They don't work. There is a step missing, and you may get warnings even if you know to hit escape first.
- Gracana 9y agoYou don't have to hit escape, ctrl-c puts you in normal mode.
- Bartweiss 9y agoIf vim opens and that's the first thing you try, then it'll work, yeah. But if you've typed anything, this won't quite work. <ctrl> c will take you out of insert mode, but won't offer any prompt. <ctrl> c again will bring up the quit prompt, but that's not intuitive the way doing it the first time is. And if you type the wrong thing after the first <ctrl> c, you'll break back into insert mode and have to take another run at it. I remember getting stuck in vim because git bash uses it as a default editor. It happened when I forgot to enter a commit message, which meant that I started typing a commit message and thereby lost the useful prompt when I went to quit. edit: per another thread, this gets far worse if you don't realize the ':' is active and not a prompt to "type: quit". That error sets off a maze that will never show you the prompt again to find your mistake.
- ZenoArrow 9y agoIn that case I'd just close the terminal window if I was running the terminal from a GUI session. Does that count?