Re: Reuse search pattern?

2009-06-01 Thread Tony Mechelynck
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

RE: Reuse search pattern?

2009-05-27 Thread Gene Kwiecinski
>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

Re: Reuse search pattern?

2009-05-27 Thread Ben Fritz
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

Re: Reuse search pattern?

2009-05-26 Thread dfishburn . vim
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

Re: Reuse search pattern?

2009-05-26 Thread Alessandro Antonello
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

Re: Reuse search pattern?

2009-05-26 Thread Tim Chase
> 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