To: vim_dev@googlegroups.com Subject: Patch 8.2.3608 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3608 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) Files: runtime/defaults.vim, src/testdir/test_autocmd.vim, src/testdir/test_cmdline.vim *** ../vim-8.2.3607/runtime/defaults.vim 2020-09-30 21:45:35.687288258 +0100 --- runtime/defaults.vim 2021-11-17 13:51:25.754831092 +0000 *************** *** 111,116 **** --- 111,127 ---- 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 *** ../vim-8.2.3607/src/testdir/test_autocmd.vim 2021-11-13 12:38:45.538835898 +0000 --- src/testdir/test_autocmd.vim 2021-11-17 13:57:54.178348567 +0000 *************** *** 2458,2463 **** --- 2458,2464 ---- CheckFeature cmdwin let lines =<< trim END + augroup vimHints | au! | augroup END let b:dummy_var = 'This is a dummy' autocmd CmdWinEnter * quit let winnr = winnr('$') *** ../vim-8.2.3607/src/testdir/test_cmdline.vim 2021-10-21 11:39:49.825486269 +0100 --- src/testdir/test_cmdline.vim 2021-11-17 13:59:04.362257011 +0000 *************** *** 1255,1260 **** --- 1255,1261 ---- CheckScreendump let lines =<< trim [SCRIPT] + augroup vimHints | au! | augroup END call setline(1, range(30)) 2split [SCRIPT] *** ../vim-8.2.3607/src/version.c 2021-11-16 20:03:50.855550911 +0000 --- src/version.c 2021-11-17 14:00:44.694124567 +0000 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 3608, /**/ -- 5 out of 4 people have trouble with fractions. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///