Vim: highlight all matches in incsearch

后端 未结 3 1457
轻奢々
轻奢々 2020-12-28 21:06

I\'m using the incsearch and hlsearch options. All matches are highlighted after I press enter, but only the first one as I type. I\'d like to high

3条回答
  •  一个人的身影
    2020-12-28 21:38

    Unfortunately, this isn't possible without writing your own search in Vimscript (capturing each key via getchar(), highlighting via :match), or patching the core Vim source code in C.

    The reason this isn't implemented is probably to keep the incsearch snappy and immediate.

    Update: Highlighting all matches now is the default behavior starting with Vim 7.4.2259 (with 'incsearch' can only see the next match).

提交回复
热议问题