Global search & replace in Vim
Matthew Hill
matthew@liquidweb.com
Thu, 14 Jun 2001 18:06:47 -0400
:%s/string1/string2/g
Will work.
Reza Beha wrote:
> Greetings, friends.
>
> I've been fruitlessly seeking a method for replacing every instance of a
> string in Vim, without needing to know a file length or row range. The best
> I've come up with so far is:
>
> :s/string1/string2/g xxx
>
> Where 'xxx' is the length of the file (like 317 lines, for instance). What
> is the proper way to accomplish this? Thanks in advance.
>
> Migrating from VMS to Linux,
>
> Reza
>
>
>
>
> -------------------------------------------------------------------------------
> Do You Yahoo!?
> Yahoo! Buzz Index - Spot the hottest trends in music, movies, and more.