LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 05-14-2005, 01:28 AM   #1
jkmartha
Member
 
Registered: Apr 2005
Location: india
Distribution: Redhat 9
Posts: 66

Rep: Reputation: 15
copy lines in vi editor


In vi editor how to copy lines of text with keyboard ?? something like.....1cc ...i donot exactly remember.
 
Old 05-14-2005, 01:33 AM   #2
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Rep: Reputation: 32
first move you cursor to the line which you wanna copy
then go into command mod by pressing ESC
then press yy which mean yank the line if you wanna copy more then one line then press y[n] where n is the no of lines to copy from the cursor.

now move you cursor to the line where you want to paste them and press p.

and its done!
 
Old 05-14-2005, 01:33 AM   #3
spariggio82
Member
 
Registered: Apr 2004
Location: Camporotondo Etneo, Sicily
Distribution: SuSE 8.2 SuSE 9.1 Fedora C1 Slackware 10.1 Knoppix 3.9
Posts: 174

Rep: Reputation: 30
To copy lines I use the nyy command

where n stands for the number of lines you want to copy.
 
Old 05-14-2005, 01:37 AM   #4
jkmartha
Member
 
Registered: Apr 2005
Location: india
Distribution: Redhat 9
Posts: 66

Original Poster
Rep: Reputation: 15
& how to paste ??
 
Old 05-14-2005, 02:19 AM   #5
spariggio82
Member
 
Registered: Apr 2004
Location: Camporotondo Etneo, Sicily
Distribution: SuSE 8.2 SuSE 9.1 Fedora C1 Slackware 10.1 Knoppix 3.9
Posts: 174

Rep: Reputation: 30
Simply use the command p

Howevere read ilnli instruction. They're very good!!!!
 
  


Reply



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
Which light text editor can copy text from file and paste in browser? davidas Linux - Software 9 03-06-2006 11:28 AM
How can we copy the program code wriiten in notepad to linux vi editor? mayank027 Linux - General 2 10-25-2005 06:14 AM
printer printing vertical lines at beginning and end of lines makhand Linux - Hardware 0 09-02-2005 02:03 PM
shell script to copy lines from a file Warmduvet Programming 2 09-14-2004 09:25 PM
boot error after using Copy Commander to copy debian system onto larger new drive Interceptor Linux - Hardware 7 05-04-2003 12:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:29 PM.

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
Open Source Consulting | Domain Registration