vim search by syntax-highlighting type

2019-05-04 10:35发布

I'm adding i18n to an existing project (web application). This involves replacing every bit of static text with calls to an i18n library. It would be convenient to be able to search for this text rather than rely on syntax highlighting to identify it visually.

In vim, is it possible to search within a file for occurrences of a certain highlighting type?

Something like:

/[%type=Boolean]

Sub 'Boolean' with 'Comment', 'htmlTag', or any group defined in your syntax highlighting file.

2条回答
成全新的幸福
2楼-- · 2019-05-04 11:09

This plugin will do it for you

查看更多
Ridiculous、
3楼-- · 2019-05-04 11:13

Take a look at the answer I gave here:

Vim search in C/C++ code lines

I think my :SearchInside command will do what you want.

查看更多
登录 后发表回答