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

送分小仙女□ 提交于 2021-01-29 20:31:22

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/60001808/vim-highlight-current-occurence-of-search-pattern-differently-than-hlsearch-to

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!