Permalink
Browse files

patch 8.0.0609: some people still don't know how to quit

Problem:    For some people the hint about quitting is not sufficient.
Solution:   Put <Enter> separately.  Also use ":qa!" to get out even when
            there are changes.
  • Loading branch information...
brammool committed Jun 4, 2017
1 parent a3921f4 commit 28a8193e3113f676f89fb6312b099d849df881d3
Showing with 3 additions and 1 deletion.
  1. +1 −1 src/normal.c
  2. +2 −0 src/version.c
View
@@ -8986,7 +8986,7 @@ nv_esc(cmdarg_T *cap)
#endif
&& !VIsual_active
&& no_reason)
MSG(_("Type :quit<Enter> to exit Vim"));
MSG(_("Type :qa! and press <Enter> to abandon all changes and exit Vim"));

This comment has been minimized.

Show comment
Hide comment
@tankorsmash

tankorsmash Jun 7, 2017

Wouldn't "Type :quitall! and press [...]" make more sense for someone who really doesn't know how to quit? :qa! is easier to type though.

@tankorsmash

tankorsmash Jun 7, 2017

Wouldn't "Type :quitall! and press [...]" make more sense for someone who really doesn't know how to quit? :qa! is easier to type though.

This comment has been minimized.

Show comment
Hide comment
@omajid

omajid Jun 7, 2017

Years ago, I, as a new user, was confused what :quit meant. I never realized that I literally had to enter a colon (:) followed by quit. Perhaps call out literally typing a colon?

@omajid

omajid Jun 7, 2017

Years ago, I, as a new user, was confused what :quit meant. I never realized that I literally had to enter a colon (:) followed by quit. Perhaps call out literally typing a colon?

This comment has been minimized.

Show comment
Hide comment
@ArsenArsen

ArsenArsen Jun 7, 2017

Wait, wouldn't even :q! work?

@ArsenArsen

ArsenArsen Jun 7, 2017

Wait, wouldn't even :q! work?

This comment has been minimized.

Show comment
Hide comment
@idanarye

idanarye Jun 7, 2017

:q!/:quit! will only close the current window. :qa!/:quitall! will close all windows.

:quit! will be fine though - the people who need this usually don't reach the point where they have multiple files open.

@idanarye

idanarye Jun 7, 2017

:q!/:quit! will only close the current window. :qa!/:quitall! will close all windows.

:quit! will be fine though - the people who need this usually don't reach the point where they have multiple files open.

This comment has been minimized.

Show comment
Hide comment
@ap

ap Jun 7, 2017

Not usually, but it can conceivably happen1, and the extra a in there really doesn’t hurt.

  1. You can create windows without user action inside Vim, e.g. launching it as vim -o *.
@ap

ap Jun 7, 2017

Not usually, but it can conceivably happen1, and the extra a in there really doesn’t hurt.

  1. You can create windows without user action inside Vim, e.g. launching it as vim -o *.

This comment has been minimized.

Show comment
Hide comment
@chrisbra

chrisbra Jun 7, 2017

Member

I also wondered, whether users understand the colon correct. I would say either put it in quotes, or colorize it or even use a double colon, e.g. Type: :qa! to quit

@chrisbra

chrisbra Jun 7, 2017

Member

I also wondered, whether users understand the colon correct. I would say either put it in quotes, or colorize it or even use a double colon, e.g. Type: :qa! to quit

This comment has been minimized.

Show comment
Hide comment
@ArsenArsen

ArsenArsen Jun 7, 2017

Correct yeah. Didn't consider people not knowing how to close Vim having multiple windows. And I do agree with the above, someone, or even better a lot of people, might not understand that colon.

@ArsenArsen

ArsenArsen Jun 7, 2017

Correct yeah. Didn't consider people not knowing how to close Vim having multiple windows. And I do agree with the above, someone, or even better a lot of people, might not understand that colon.

This comment has been minimized.

Show comment
Hide comment
@ap

ap Jun 7, 2017

The customary way to address that is to say something like Type ":qa!" (without the quotes).

@ap

ap Jun 7, 2017

The customary way to address that is to say something like Type ":qa!" (without the quotes).

This comment has been minimized.

Show comment
Hide comment
@idanarye

idanarye Jun 7, 2017

If you launch Vim with vim -o * you won't see the splash screen - so it doesn't matter what's written there...

It's true that the extra a is not a lot to type, but since @tankorsmash said in the first comment here that the clueless users this change is for may be confused by the shortened commands, I want to argue that "quit" is less confusing than "quitall". What is "all"? Is this going to close my shell? Log me out? We know that "all" refers to "all open windows", but that's because we know Vim...

@idanarye

idanarye Jun 7, 2017

If you launch Vim with vim -o * you won't see the splash screen - so it doesn't matter what's written there...

It's true that the extra a is not a lot to type, but since @tankorsmash said in the first comment here that the clueless users this change is for may be confused by the shortened commands, I want to argue that "quit" is less confusing than "quitall". What is "all"? Is this going to close my shell? Log me out? We know that "all" refers to "all open windows", but that's because we know Vim...

This comment has been minimized.

Show comment
Hide comment
@ArsenArsen

ArsenArsen Jun 7, 2017

While we are at it, might as well tell them how to change EDITOR and GIT_EDITOR

/s

@ArsenArsen

ArsenArsen Jun 7, 2017

While we are at it, might as well tell them how to change EDITOR and GIT_EDITOR

/s

This comment has been minimized.

Show comment
Hide comment
@ap

ap Jun 7, 2017

If you launch Vim with vim -o * you won't see the splash screen – so it doesn't matter what's written there…

Didn’t think of that. Indeed you only get the message if you run Vim without opening any files at all. So yeah, the a is strictly superfluous.

Then again… it might be useful to teach a user the more general form, just in case they end up in Vim accidentally again and don’t get the helpful message? So I’d still lean towards including it… but can now take it or leave it.

It's true that the extra a is not a lot to type, but since @tankorsmash said in the first comment here that the clueless users this change is for may be confused by the shortened commands, I want to argue that "quit" is less confusing than "quitall". What is "all"? Is this going to close my shell? Log me out? We know that "all" refers to "all open windows", but that's because we know Vim...

But @tankorsmash didn’t speak of confusion – @omajid did. And what he said is that he didn’t realise that :quit<Enter> was something he was supposed to type. The way I understood this is that if the command looks like a word, a user is less likely to realise it’s supposed to be read as a sequence of keystrokes. If so, then that argues for something that visually looks like a key combo over a more mnemonic form.

While we are at it, might as well tell them how to change EDITOR and GIT_EDITOR

It’s possible to go too far in that direction, but including the a doesn’t feel anywhere close to it to me.

@ap

ap Jun 7, 2017

If you launch Vim with vim -o * you won't see the splash screen – so it doesn't matter what's written there…

Didn’t think of that. Indeed you only get the message if you run Vim without opening any files at all. So yeah, the a is strictly superfluous.

Then again… it might be useful to teach a user the more general form, just in case they end up in Vim accidentally again and don’t get the helpful message? So I’d still lean towards including it… but can now take it or leave it.

It's true that the extra a is not a lot to type, but since @tankorsmash said in the first comment here that the clueless users this change is for may be confused by the shortened commands, I want to argue that "quit" is less confusing than "quitall". What is "all"? Is this going to close my shell? Log me out? We know that "all" refers to "all open windows", but that's because we know Vim...

But @tankorsmash didn’t speak of confusion – @omajid did. And what he said is that he didn’t realise that :quit<Enter> was something he was supposed to type. The way I understood this is that if the command looks like a word, a user is less likely to realise it’s supposed to be read as a sequence of keystrokes. If so, then that argues for something that visually looks like a key combo over a more mnemonic form.

While we are at it, might as well tell them how to change EDITOR and GIT_EDITOR

It’s possible to go too far in that direction, but including the a doesn’t feel anywhere close to it to me.

This comment has been minimized.

Show comment
Hide comment
@vim-ml

vim-ml Jun 7, 2017

@vim-ml

vim-ml via email Jun 7, 2017

This comment has been minimized.

Show comment
Hide comment
@k-takata

k-takata Jun 7, 2017

Member

If you launch Vim with vim -o * you won't see the splash screen - so it doesn't matter what's written there...

This is not the case. The message changed in this commit is shown when a user type Ctrl-C in the normal mode.

@k-takata

k-takata Jun 7, 2017

Member

If you launch Vim with vim -o * you won't see the splash screen - so it doesn't matter what's written there...

This is not the case. The message changed in this commit is shown when a user type Ctrl-C in the normal mode.

This comment has been minimized.

Show comment
Hide comment
@lfv89

lfv89 Jun 7, 2017

Years ago, I, as a new user, was confused what :quit meant. I never realized that I literally had to enter a colon (:) followed by quit. Perhaps call out literally typing a colon?

Totally agree, that was me as well... Maybe something like:

Type ":" followed by "qa!" and then press <Enter> [...]
@lfv89

lfv89 Jun 7, 2017

Years ago, I, as a new user, was confused what :quit meant. I never realized that I literally had to enter a colon (:) followed by quit. Perhaps call out literally typing a colon?

Totally agree, that was me as well... Maybe something like:

Type ":" followed by "qa!" and then press <Enter> [...]

This comment has been minimized.

Show comment
Hide comment
@ap

ap Jun 7, 2017

@lfv89: Wouldn’t Type ":qa!" (without the quotes) and press <Enter> cover you?

@ap

ap Jun 7, 2017

@lfv89: Wouldn’t Type ":qa!" (without the quotes) and press <Enter> cover you?

This comment has been minimized.

Show comment
Hide comment
@lfv89

lfv89 Jun 7, 2017

@ap It would actually, it's indeed way less esoteric then :quit<Enter> for a newbie.

@lfv89

lfv89 Jun 7, 2017

@ap It would actually, it's indeed way less esoteric then :quit<Enter> for a newbie.

This comment has been minimized.

Show comment
Hide comment
@dbmrq

dbmrq Jun 7, 2017

Also many people accidentally end up in insert mode, so the safest option would be Press <ESC>, type ":qa!" (without the quotes) and press <ENTER>.

@dbmrq

dbmrq Jun 7, 2017

Also many people accidentally end up in insert mode, so the safest option would be Press <ESC>, type ":qa!" (without the quotes) and press <ENTER>.

This comment has been minimized.

Show comment
Hide comment
@k-takata

k-takata Jun 7, 2017

Member

@dbmrq This message is only shown in normal mode. No need to press <ESC> when it it shown.

@k-takata

k-takata Jun 7, 2017

Member

@dbmrq This message is only shown in normal mode. No need to press <ESC> when it it shown.

This comment has been minimized.

Show comment
Hide comment
@tbodt

tbodt Jun 8, 2017

@dbmrq As far as I'm aware this message only appears when you hit ctrl-c in normal mode, the rationale being that if you're in insert mode ctrl-c will exit insert mode and another ctrl-c will display the message.

@tbodt

tbodt Jun 8, 2017

@dbmrq As far as I'm aware this message only appears when you hit ctrl-c in normal mode, the rationale being that if you're in insert mode ctrl-c will exit insert mode and another ctrl-c will display the message.

This comment has been minimized.

Show comment
Hide comment
@tracyone

tracyone Jun 8, 2017

哈哈哈

@tracyone

tracyone Jun 8, 2017

哈哈哈

/* Don't reset "restart_edit" when 'insertmode' is set, it won't be
* set again below when halfway a mapping. */
View
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
609,
/**/
608,
/**/

3 comments on commit 28a8193

@karuna

This comment has been minimized.

Show comment
Hide comment
@karuna

karuna Jun 7, 2017

maybe highlight and blink the line showing this message

karuna replied Jun 7, 2017

maybe highlight and blink the line showing this message

@oversky

This comment has been minimized.

Show comment
Hide comment
@oversky

oversky Jun 8, 2017

As I knew how to manager .vimrc,
the first thing I changed is assigning F2 to Quit, and F3 to File,
just like PE2.

oversky replied Jun 8, 2017

As I knew how to manager .vimrc,
the first thing I changed is assigning F2 to Quit, and F3 to File,
just like PE2.

@oversky

This comment has been minimized.

Show comment
Hide comment
@oversky

oversky Jun 8, 2017

As I knew how to manager .vimrc,
the first thing I changed is assigning F2 to Quit, and F3 to File,
just like PE2.
I even made it appear in the status bar.
https://i.imgur.com/0kn1eyb.png

oversky replied Jun 8, 2017

As I knew how to manager .vimrc,
the first thing I changed is assigning F2 to Quit, and F3 to File,
just like PE2.
I even made it appear in the status bar.
https://i.imgur.com/0kn1eyb.png

Please sign in to comment.