5 ms·
dev: That just typed ':q' into the text area me: Hit escape first, then :q dev: Oh, then why doesn't say escape then :q me: welp
by dsp1234 9y ago
dev: That just typed ':q' into the text area
me: Hit escape first, then :q
dev: Oh, then why doesn't say escape then :q
me: welp
- eridius 9y agoCute, but no. When you enter insert mode, the "welcome screen" disappears. So if you can see the instruction telling you to type ':quit', then typing :quit will work.
- dsp1234 9y agoFTA, https://zgab33vy595fw5zq-zippykid.netdna-ssl.com/wp-content/uploads/2017/05/exitvim-1024x455.png https://zgab33vy595fw5zq-zippykid.netdna-ssl.com/wp-content/... It happens because people don't what they are doing. You assume that they hit ctrl+c, then immediately type :quit, but if they did, then they wouldn't be Googling it. They did something between trying to exit and quit that got them into a different mode.
- FreeFull 9y agoPerhaps they miss the : Without it, you end up recording a macro and going into insert mode.
- eridius 9y agoI'm not assuming they're hitting Ctrl+C. What I'm saying is the screen that says VIM - Vi IMproved version 8.0.567 by Bram Moolenaar et al. Vim is open source and freely distributable Sponsor Vim development! type :help sponsor<Enter> for information type :q<Enter> to exit type :help<Enter> or <F1> for on-line help type :help macvim<Enter> for MacVim help disappears as soon as you enter insert mode (or really interact with Vim at all). If you're in insert mode, you don't see this. So if you see this, typing :quit will work.
- dsp1234 9y agoOf course, yes. The above commenter mentioned insert mode and ctrl+c which is why I was missing that you particularly were talking about this one screen.
- StavrosK 9y agoEven if you're in insert mode, ctrl-c takes you to normal mode, then a second press will show you the hint.
- dsp1234 9y agoAnother thing I've seen is the person reads the text as: "Type: quit<enter> to exit Vim" Since the colon is used a separator such as I used it above. Then they type "quit" and enter, which actually put them in insert mode recording "@u", with a 't' sitting in the text area.
- Bartweiss 9y agoWait, this is how I got so stuck my first time in vim! It sets you up for a whole string of problems in a row: - You enter an unfamiliar mode, immediately hit "^c". - That prompts "Type :quit<enter> to exit Vim". - You mistakenly type "quit<enter>". So now you're in insert mode with recording, as you said. - You hit "^c" again, breaking out of insert mode, but you don't get the exit prompt like you did last time - the `recording` message blocks that no matter how much you hit "^c". - Without the reference message to find your mistake, you maybe try "quit<enter>" again. 'q' now terminates recording, 'u' undoes your typing, and 'i' dumps you back into insert mode, leaving you with a text field of 't' again! - At this point you maybe hit "^c" again. That'll drop you out of insert, but with text in the field vim no longer prompts you to quit. If you enter "^c" again it will prompt you, but you tried that during recording mode and it did nothing, so you don't expect aimless repetition to help anything! At this point, you give up, google "quit vim" and discover that the colon was important. I'm pretty sure this madness if what I did the first time git for windows popped open vim as the default editor.
- binarycrusader 9y agoExcept, if you hit Ctrl+C, you don't have to hit ESC. You literally type what it tells you and it works. The only way the above would work as suggested is if the person hit an insert mode key first after having typed Ctrl+C.
- YeGoblynQueenne 9y agoWeelll. The problem is that the "quit" command has an insert mode key in it. So it's quite possible to get stuck like a poster above says- enter macro recording, then insert mode, then write the letter "t". On the other hand that only happens if you type "quit" without the colon and the message makes it very clear that the colon is part of the text you must enter: Type :quit<Enter> to exit Vim See all that whitespace? It's very hard to think the colon goes to the "Type" bit. So you can get stuck in a dubm situation but it's not terribly easy.
- binarycrusader 9y agoSee all that whitespace? It's very hard to think the colon goes to the "Type" bit. Except, logically, why would they bother to specially call out <Enter>, a whitespace character, but not the spaces as well if they intended the user to type them? I can't think of any obvious, safe way to display text that a user should type that isn't subject to possible misinterpretation in the single line of output available.
- YeGoblynQueenne 9y agoAlright, but if we're being so scholastic it should be said that you can misinterpret any set of instructions and in this case, squinting at the command line a couple of times to make sure you got the command right is all it should take you to get it right.