Re: changing multiple things on one line in vi

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Matt Alexander
Date:  
To: Main PLUG discussion list
Subject: Re: changing multiple things on one line in vi
MCR wrote:

>This is along the line of a couple of posts today, so
>I thought I would finally ask. When I have a document
>open in vi, sometimes I would like to do a change and
>have it apply to only one line, I know how to do it
>globally, but I can not seem to find out how to do it
>for just the one line. Example:
>For global: say I have a html document and my image
>directory is named "images". I decide to change the
>name of the directory to pictures, I know to do this
>for the whole document I do:
>:%s/images/pictures/g
>
>
>


Instead of %s, use just the line number you want to edit. So, to change
only line 34...

:34s/images/pictures/g



---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss