Tuesday, August 31, 2010

Re: Vim RE and lazy operator

Hi

caruso_g wrote:
> A little follow up.
> Is there a way to highlight the matched string while constructing the
> RE?
> I mean, I set the option to show that while I make a search with /
> or ?
> But is there a similar option that I can set to do the same while I
> begin to write the RE in s/ ?
> If not, can I re-use the previous search in the s/ ex command with a
> shortcut or something like that (I remember that I read it but I don't
> remember where… :P ).

if you keep the pattern of a :s empty, i.e.,

:%s//your replacement string/

the last used search pattern will get re-used.

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

--
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: