LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-23-2008, 07:23 AM   #1
juber
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Rep: Reputation: 0
Command for copy


could you please tell me what are the commands for copy and paste for a particular word or sentence of a line in vi editing mode of a file for Redhat Enterprise v.4. As well what are the commands for Visual Mode.
.....Thank you !
 
Old 08-23-2008, 07:33 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
man vimtutor (have fun learning!)

A copy is a 'yank', so: 12yw = yank 12 words

A paste is P (but not in insert mode)

That's the most basic stuff - play with the tutor to learn more.
 
Old 08-23-2008, 07:34 AM   #3
varunnarang
LQ Newbie
 
Registered: Oct 2004
Location: India
Distribution: RHL 9.0
Posts: 22

Rep: Reputation: 15
There's plenty of documentation available on how to use VI editor but graphically and on command line. You might want to Google for some links.
A quick one is below:
http://www.cs.rit.edu/~cslab/vi.html

Hope this would help.

+ Varun.
 
Old 08-23-2008, 07:41 AM   #4
sica07
Member
 
Registered: May 2008
Distribution: Arch
Posts: 47
Blog Entries: 3

Rep: Reputation: 16
In visual mode:
-highlight the the text, press d tu cut, y to copy
-move to target location, press P to paste aftercursor or p to paste before the cursor
 
Old 08-23-2008, 08:54 AM   #5
cmx08
Member
 
Registered: Aug 2008
Location: Malaysia
Distribution: Fedora Core
Posts: 35

Rep: Reputation: 15
vi command copy by row (not in insert mode)

:set number
:a,b y and press p button to paste (before paste u need to point the cursor to the location u want to paste)

a = row start copy (put in number)
b = row end copy (put in number)
y = copy

Last edited by cmx08; 08-23-2008 at 08:55 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy command jkeertir Linux - Newbie 3 05-30-2008 12:26 AM
Copy command yusufs Linux - General 3 10-28-2007 05:16 AM
Copy command yusufs Linux - Newbie 3 10-25-2007 06:58 AM
copy command munna_dude Linux - General 19 06-21-2007 07:57 AM
Help on copy command Nishant Desai Linux - Software 3 09-20-2006 03:50 AM


All times are GMT -5. The time now is 08:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration