On 27/05/09 17:21, Gene Kwiecinski wrote:
>
>> When I substitute using ":s/{pattern}/{string}/{option}", I prefer
>> to use "/{pattern}" to check out...
>
> You already got answer by now, but in general, if you just need to
> modify the pattern if it be *un*satisfactory, just type '/' and then
> s
>When I substitute using ":s/{pattern}/{string}/{option}", I prefer
>to use "/{pattern}" to check out...
You already got answer by now, but in general, if you just need to
modify the pattern if it be *un*satisfactory, just type '/' and then
scroll through the earlier search patterns with the up/d
On May 26, 9:49 pm, wilson.m@convergys.com wrote:
> Hi there,
> When I substitute using ":s/{pattern}/{string}/{option}", I prefer to use
> "/{pattern}" to check out
> whether the pattern is satisfactory. After checking, I will run the
> substitute command. However, if
> the pattern string i
Yes, type
:%s/
Then hit the up arrow and cycle through previous patterns.
Also
:%s//dave
Notice no search pattern is specified, this says use the previous search
pattern.
So I do what you do all the time.
/mypattern
:%s//myreplacement/g
HTH,
Dave
Sent from my BlackBerry device on the Roge
You don't needed "copy".
If you wrote
/something
to find what will be changed, just type
:s//change_something
or
:%s//change_something
or else
:%s//change_something/g
Vim will reuse your last search pattern
It's magic!
Alessandro Antonello
2009/5/26 :
>
> Hi there,
> When I substitut
> When I substitute using ":s/{pattern}/{string}/{option}", I prefer to use
> "/{pattern}" to check out
> whether the pattern is satisfactory. After checking, I will run the
> substitute command. However, if
> the pattern string is too complicated, typing it twice is boring. I would
> like to