views:

70

answers:

2

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.

+1  A: 

This plugin will do it for you

Geoff Lanotte
This is probably the closest solution there is, but it doesn't seem to work for my purposes. When I try to select the syntax highlighting type I wish to search for (plain text within an HTML file), it says "There is no syntax group specified under the cursor".
mwc
+1  A: 

Take a look at the answer I gave here:

http://stackoverflow.com/questions/2683521/vim-search-in-c-c-code-lines/2696143#2696143

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

Bill Odom
This is awesome, thank you. Upvoted. It will definitely come in handy for many things, but the problem with this particular question is that some of the text I'm trying to search for has no "syntax type".
mwc