Mercurial > vim
comparison runtime/defaults.vim @ 26153:44fe7d15881d v8.2.3608
patch 8.2.3608: users who type "q:" instead of ":q" are confused
Commit: https://github.com/vim/vim/commit/125ffd21f9601a90b845f1d50c24da0d3938bb59
Author: Egor Zvorykin <egzvor@gmail.com>
Date: Wed Nov 17 14:01:14 2021 +0000
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 17 Nov 2021 15:15:05 +0100 |
parents | 17c4178f26ea |
children | 786b2a8ec970 |
comparison
equal
deleted
inserted
replaced
26152:c2458468e65b | 26153:44fe7d15881d |
---|---|
109 \ | exe "normal! g`\"" | 109 \ | exe "normal! g`\"" |
110 \ | endif | 110 \ | endif |
111 | 111 |
112 augroup END | 112 augroup END |
113 | 113 |
114 " Quite a few people accidentally type "q:" instead of ":q" and get confused | |
115 " by the command line window. Give a hint about how to get out. | |
116 " If you don't like this you can put this in your vimrc: | |
117 " ":augroup vimHints | au! | augroup END" | |
118 augroup vimHints | |
119 autocmd! CmdwinEnter * | |
120 \ echohl Todo | | |
121 \ echo 'You discovered the command-line window! You can close it with ":q".' | | |
122 \ echohl None | |
123 augroup END | |
124 | |
114 endif | 125 endif |
115 | 126 |
116 " Switch syntax highlighting on when the terminal has colors or when using the | 127 " Switch syntax highlighting on when the terminal has colors or when using the |
117 " GUI (which always has colors). | 128 " GUI (which always has colors). |
118 if &t_Co > 2 || has("gui_running") | 129 if &t_Co > 2 || has("gui_running") |