Warm tip: This article is reproduced from stackoverflow.com, please click
vim

vim highlight current occurence of search pattern differently than `hlsearch` to help find cursor po

发布于 2020-03-30 21:14:09

Lets say I search using /plug now if the hlsearch is on vim will highlight all the occurrence of keyword plug

now if my cursor is on the 2nd occurrence I want to highlight that differently so that i can quickly find where my cursor is

for example you can see in the following image it hard to quickly find the cursor position enter image description here

Questioner
Tripurari Shankar
Viewed
61
Peter Rincker 2020-02-02 04:20

The vim-searchlight will highlight the current search match. It does this without any mappings and works with popular plugin vim-cool. There others as well: vim-seachhi & vim-searchant.