type :q<Enter> to exit type :q<Enter> to exitIronically you might have learned about it sooner by using Emacs more, because then you'd be more likely to use the ctrl-v Emacs hotkey for scrolling down fast (which also works in less) and mispress it.
I think a lot of confusion could be avoided if distributions like Ubuntu, that are commonly used by new Linux users, were to set e.g. EDITOR=nano in their default ~/.bashrc. That way, writing "git commit" from a terminal, typing "v" inside less, etc. would all bring up nano instead of vim by default.
*core.editor*
*By default, Git uses whatever you’ve set as your default text editor via
one of the shell environment variables VISUAL or EDITOR, or else falls back
to the vi editor to create and edit your commit and tag messages*
https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
It seems that many people leave their default editor undefined so git opens vi for commit messages by default. vi tends to be symlinked to vim on many systems so that means they end up in vim (not that it makes a difference, I'm just being pedantic :).Some say vim was created to give us an excuse to hit <Esc> over and over again.
Or they might have been working on a file for hours before they want to quit it, so might not remember.
Or, they might not know how to enter :q. Entering it requires them to be in the right mode.
(I say this as someone who's used Vim for a number of years).
I doubt Vim killer save the file for you either.
Its 'ZZ', kid. Or ":q!" if you don't wanna save your mods ..
to Exit:
type <ESC>
type :q!<Enter>