>> I'd like to use a defined syntax group as a range; eg.
>>         {cComment}s/me/you/g
>> to substitute every "me" by "you" in C-comments.
>>
>> I found SrchRplcHiGrp (http://www.vim.org/scripts/script.php?script_id=848)
>> but that does only search/replace ...
> 
> Doesn't this plugin answer your need stated above ? You said
>     "I want X. I found the plugin that does exactly X, but I'm not
> satisfied." ?
> How one is supposed to understand such request ?

My understanding is that the OP wants a generic range to be
defined by a syntax block...not just for ":s" commands, but for
any Ex command that takes a range, such as

  :{cComment}d

to delete all the lines that have cComment highlighting (yes, one
butts against line-wise vs. character-wise issues here, but
ex-ranges are always line-wise unless you employ workarounds) or

  :{cComment}>>

to indent all commented lines.

I might be mis-understanding the OP, but it sounds like
SrchRplcHiGrp only does ":s" commands.

-tim



Reply via email to