From 125ffd21f9601a90b845f1d50c24da0d3938bb59 Mon Sep 17 00:00:00 2001 From: Egor Zvorykin Date: Wed, 17 Nov 2021 14:01:14 +0000 Subject: patch 8.2.3608: users who type "q:" instead of ":q" are confused Problem: Users who type "q:" instead of ":q" are confused. Solution: Add an autocmd to give a message that explains this is the command-line window. (Egor Zvorykin, closes #9146) --- runtime/defaults.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'runtime') diff --git a/runtime/defaults.vim b/runtime/defaults.vim index f3c639bc74..9b46c8e78a 100644 --- a/runtime/defaults.vim +++ b/runtime/defaults.vim @@ -111,6 +111,17 @@ if 1 augroup END + " Quite a few people accidentally type "q:" instead of ":q" and get confused + " by the command line window. Give a hint about how to get out. + " If you don't like this you can put this in your vimrc: + " ":augroup vimHints | au! | augroup END" + augroup vimHints + autocmd! CmdwinEnter * + \ echohl Todo | + \ echo 'You discovered the command-line window! You can close it with ":q".' | + \ echohl None + augroup END + endif " Switch syntax highlighting on when the terminal has colors or when using the -- cgit v1.2.3