🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3425

Re: question about "vi"

#3425
From: Dahe Chen
Date: Mon, 13 Feb 1989 20:04
35 lines
1317 bytes
In article <740@bnlux0.bnl.gov> como@bnl-max (Andrew T. Como) writes:
>
>I have a question about vi.
>
>Here are five lines:
>	The cow jumped over the moon
>	The cow jumped over the moon
>	The cow jumped over the moon
>	The cow jumped over the moon
>	The cow jumped over the moon
>
>	How can I substitute /cow/dog only on lines 1 and 5
>
>I guess what I'm asking is if I
>search for cow -  /cow/
>now substitute - s/cow/dog/
>skip the next 3 lines  n  n  n
>...how can I re-issue the same substitution when I come to line 5
>
>
>Thanks in advance for the help
>

Two ways you can do it:

1. Move the curosr to the line you want to substitute and type &, or

2. do :#&<RETURN> where # is the line number.


-------
Dahe Chen
internet:   dchen@twolf.ce.yale.edu ( @venus.ycc.yale.edu )
	    chen-dahe@cs.yale.edu
bitnet:	    dchen@yalevms
Technical Details
Message-ID: <50519@yale-celray.yale.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!husc6!yale!chen-dahe
References: <740@bnlux0.bnl.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!husc6!yale!chen-dahe
From: chen-dahe@CS.YALE.EDU (Dahe Chen)
Newsgroups: comp.editors
Subject: Re: question about "vi"
Message-ID: <50519@yale-celray.yale.UUCP>
Date: 13 Feb 89 20:04:29 GMT
References: <740@bnlux0.bnl.gov>
Sender: root@yale.UUCP
Reply-To: chen-dahe@CS.YALE.EDU (Dahe Chen)
Organization: Yale University Computer Science Dept, New Haven CT  06520-2158
Lines: 35