On Fri, May 25, 2007 at 08:06:47AM -0500, Tim Chase wrote: > > 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
This is what SrchRplcHiGrp can easily do... > 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) ...except it of course deletes the comments, not the lines they are on. Line-wise commands make little sense for syntax groups, as you example > or > > :{cComment}>> > > to indent all commented lines. demonstrates. What if the line contains three comments? How one indents each? If the goal is :g with the set of lines determined by the presence of some syntax group *anywhere and any number of times* in the line, this makes sense and can be done by scanning the buffer, looking at syntax groups and then running the specified command -- SrchRplcHiGrp might be be a good start for such a function. Yeti -- http://gwyddion.net/