On Fri, December 11, 2009 8:10 am, Gary Johnson wrote:
> On 2009-12-11, Christian Brabandt wrote:
>> I am surprised, nobody has suggested
>> :'<,'>s...@.*@/* & */@
>> yet
>
> That's because that will put "/* " and " */" around all of the text
> in each of the lines within the visually-selected region, and that's
> not what I understood Tim to want.
True. In that case, you could use
:'<,'>s/\%'<\_.*\%'>/* & */
Well, at least, that was what I thought. But that does not work here on
gvim 7.2.284 Windows. I tried several variations, like
:'<,'>s/\%<'<\_.\{-\}\%>'>/* & */
But I always get E486. Anybody knows how that is supposed to work? That
smells like a bug to me.
(a little bit later):
Well, this one works and yields the expected result:
:'<,'>s/\%<'>\_.*\%<'>../\/* & *\//
as does this one
'<,'>s/\%'<\_.*\%<'>../\/* & *\//
But I still think, there is a bug in how the regex engine handles \%<'>
and \%>'> marks. Am I missing something?
regards,
Christian
--
:wq!
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php