diff runtime/doc/options.txt @ 12720:37c384802df4 v8.0.1238

patch 8.0.1238: incremental search only shows one match commit https://github.com/vim/vim/commit/2e51d9a0972080b087d566608472928d5b7b35d7 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 29 16:40:30 2017 +0100 patch 8.0.1238: incremental search only shows one match Problem: Incremental search only shows one match. Solution: When 'incsearch' and and 'hlsearch' are both set highlight all matches. (haya14busa, closes #2198)
author Christian Brabandt <cb@256bit.org>
date Sun, 29 Oct 2017 16:45:04 +0100
parents b390f5003e2f
children 0c704288ced4
line wrap: on
line diff
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -4447,7 +4447,17 @@ A jump table for the options with a shor
 	match may not be found.  This is to avoid that Vim hangs while you
 	are typing the pattern.
 	The highlighting can be set with the 'i' flag in 'highlight'.
-	See also: 'hlsearch'.
+	When 'hlsearch' is on, all matched strings are highlighted too while typing
+	a search command. See also: 'hlsearch'.
+	If you don't want turn 'hlsearch' on, but want to highlight all matches
+	while searching, you can turn on and off 'hlsearch' with autocmd.
+	Example: >
+		augroup vimrc-incsearch-highlight
+		  autocmd!
+		  autocmd CmdlineEnter [/\?] :set hlsearch
+		  autocmd CmdlineLeave [/\?] :set nohlsearch
+		augroup END
+<
 	CTRL-L can be used to add one character from after the current match
 	to the command line.  If 'ignorecase' and 'smartcase' are set and the
 	command line has no uppercase characters, the added character is