> Reply to message «visual block search and replace»,
> sent 13:20:28 14 July 2011, Thursday
> by subith86:
>
>
>> :s/\%V504\503/g
>>
> I guess you meant
> :'<,'>s/\%V504/503/g
> (though it is not related to the issue: s/\%V504\503 should not show «Invalid
> character after \%»). I don't see any way to disable \%V neither at compile time
> nor using some option, so maybe you have just typed \%v (note the case) instead?
>
> I guess it may also appear due to too old vim. According to the help (:h new-
> items-7) \%V was introduced in vim-7.0, so if you have older vim it won't work.
>
> Original message:
>
>> Hi all,
>>
>> I'm trying to do a search and replace inside a visual block as shown below
>>
>> :s/\%V504\503/g
>>
>> but it gives an error - Invalid character after \%
>>
>> Obviously, this happens in search too.
>> /\%V504
>>
>> But the same works in another machine. So I doubt I'm missing some
>> configuration in VIM or some VIM package needs to be installed. Please
>> help.
>>
As written, I'd expect that vim would issue two messages for the given
substitute command:
E65: Illegal back reference
E476: Invalid command
so either a) the pattern isn't given correctly, or b) ZyX is right and
Premdas is using a pre-v7.0 vim. I suspect it was E71.
Regards,
Chip Campbell
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment