Re: vi editor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: pgpHKQiYv8vuP.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux