[Wylug-discuss] Vi question
Philip Wyett
philipwyett at dsl.pipex.com
Mon Jun 30 11:48:24 BST 2003
--
On Mon, 2003-06-30 at 11:28, Chris Davies wrote:
> On Monday, June 30, 2003 11:19 AM, David.ALLEN at eur.crowncork.com wrote:
> > Here is a question for all you Vi experts; How do you do a global
> > find and replace?
>
> Shouldn't this be on the HELP list?
> :%s/old/new/g
>
Hi,
If you wish to be a little careful, you can use confirmation of each
change by adding 'c' e.g.
:%s/old/new/gc
This will search for 'old' and stop highlighting or underlining each
occurrence of 'old' with carets '^'. To make the change hit the 'y' or
to not and move onto the next 'n' etc. until your done.
Regards
Phil
--
AOL Instant Messenger (AIM) or Yahoo Messenger: PhilipWyett
Email: philipwyett at dsl.pipex.com
Website: http://www.philipwyett.dsl.pipex.com
Public key: http://www.philipwyett.dsl.pipex.com/gpg/public_key.txt
--
--
Content-Description: This is a digitally signed message part
[ signature.asc of type application/pgp-signature deleted ]
--
More information about the Wylug-discuss
mailing list