vi editor

Steve Searle steve at stevesearle.com
Fri Aug 25 14:13:02 UTC 2006


Around 02:58pm on Friday, August 25, 2006 (UK time), Kaushal Shriyan scrawled:

> Hi ALL
> 
> How do i select the entire contents of the file using vi to copy and
> then paste it to the other file
> 
> For example
> 
> vi copy --- > select the entire contents on one machine
> vi paste ---> paste it on the second machine

No need to do the "vi copy" bit.

Edit the paste file, move to the line above where you want the "copy"
data inserted, and in command mode enter

	:r paste

r is short for read.  If paste isn't in the working directory prefix the
name with the path information.

Or,
	:$r paste
pastes the data at the end of the file you are editing.

	:0r paste
pastes it at the beginning

	:185r paste
pastes it after line 185

	:/pattern/r paste
pastes it after line containing pattern

> Kaushal

Steve

-- 

A:  Because it messes up the order in which people normally read text.
Q:  Why is top-posting a bad thing?

 15:03:34 up 6 days, 16:29,  2 users,  load average: 0.05, 0.01, 0.00
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060825/f52efc0b/attachment-0001.sig>


More information about the fedora-list mailing list