runtime(doc): use a single pattern in :h 'incsearch' example
Commit:
https://github.com/vim/vim/commit/a0f37dbbf413537815656fb0752a8eb926acb05c
Author: zeertzjq <[email protected]>
Date: Thu Sep 11 15:08:57 2025 -0400
runtime(doc): use a single pattern in :h 'incsearch' example
related: https://github.com/vim/vim/pull/18262#issuecomment-3277008408
closes: https://github.com/vim/vim/issues/18270
Signed-off-by: zeertzjq <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 66e94b0b8..490ad4456 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 9.1. Last change: 2025 Sep 02
+*autocmd.txt* For Vim version 9.1. Last change: 2025 Sep 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1629,7 +1629,8 @@ The pattern is interpreted like mostly used in file names:
Note that for all systems the '/' character is used for path separator (even
for MS-Windows). This was done because the backslash is difficult to use in a
-pattern and to make the autocommands portable across different systems.
+pattern and to make the autocommands portable across different systems. To
+only match a '/' on all platforms (e.g. in a non-file pattern), use "\/".
It is possible to use |pattern| items, but they may not work as expected,
because of the translation done for the above.
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 6d6f341bc..7d891a1cf 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -5088,8 +5088,8 @@ A jump table for the options with a short description can
be found at |Q_op|.
autocmd. Example: >
augroup vimrc-incsearch-highlight
autocmd!
- autocmd CmdlineEnter /,\? :set hlsearch
- autocmd CmdlineLeave /,\? :set nohlsearch
+ autocmd CmdlineEnter [\/\?] :set hlsearch
+ autocmd CmdlineLeave [\/\?] :set nohlsearch
augroup END
<
CTRL-L can be used to add one character from after the current match
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1uwml8-000XcS-Rf%40256bit.org.