aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@protonmail.com>2022-04-11 22:20:24 +0600
committerFamiu Haque <famiuhaque@protonmail.com>2022-04-17 19:24:59 +0600
commitb16afe4d556af7c3e86b311cfffd1c68a5eed71f (patch)
tree7a7ad533686d93535238adad0c931259a51aa6cc /runtime
parent3f2e9298bdd971a4d2baa298aff7c6f2c2c1ad1a (diff)
downloadrneovim-b16afe4d556af7c3e86b311cfffd1c68a5eed71f.tar.gz
rneovim-b16afe4d556af7c3e86b311cfffd1c68a5eed71f.tar.bz2
rneovim-b16afe4d556af7c3e86b311cfffd1c68a5eed71f.zip
feat(highlight): implement CurSearch highlight
Adds a `CurSearch` highlight group to highlight the current search result under the cursor.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/options.txt8
-rw-r--r--runtime/doc/syntax.txt3
-rw-r--r--runtime/doc/vim_diff.txt2
3 files changed, 11 insertions, 2 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 7ea6a92a34..1966a344b2 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -3176,8 +3176,12 @@ A jump table for the options with a short description can be found at |Q_op|.
'hlsearch' 'hls' boolean (default on)
global
When there is a previous search pattern, highlight all its matches.
- The |hl-Search| highlight group determines the highlighting. Note that
- only the matching text is highlighted, any offsets are not applied.
+ The |hl-Search| highlight group determines the highlighting for all
+ matches not under the cursor while the |hl-CurSearch| highlight group
+ (if defined) determines the highlighting for the match under the
+ cursor. If |hl-CurSearch| is not defined, then |hl-Search| is used for
+ both. Note that only the matching text is highlighted, any offsets
+ are not applied.
See also: 'incsearch' and |:match|.
When you get bored looking at the highlighted matches, you can turn it
off with |:nohlsearch|. This does not change the option value, as
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 6875f43b86..e9d75002d3 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -5090,6 +5090,9 @@ ColorColumn used for the columns set with 'colorcolumn'
*hl-Conceal*
Conceal placeholder characters substituted for concealed
text (see 'conceallevel')
+ *hl-CurSearch*
+CurSearch used for highlighting a search pattern under the cursor
+ (see 'hlsearch')
*hl-Cursor*
Cursor character under the cursor
lCursor the character under the cursor when |language-mapping|
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 59f085977b..f5cd24b734 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -351,6 +351,8 @@ Functions:
Highlight groups:
|hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other
groups
+ |hl-CurSearch| highlights match under cursor instead of last match found
+ using |n| or |N|
|hl-CursorLine| is low-priority unless foreground color is set
*hl-VertSplit* superseded by |hl-WinSeparator|