|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all,
How can i select all and copy text in VI Editor. Rakesh Gupta |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
The only thought I have is to go to the top line of your document and do "yyX", where X is the number of lines in your doc. That will yank all the lines into the buffer. Then put your cursor where you want the copy to go and do a "p"
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Is there no other way as with yyX i would have to know the number of lines in advance (though its not a problem) but still if there is shorter way please point it out.
Thanks for the reply, Rakesh |
|
#4
|
|||
|
|||
|
You can do it this way also, which doesn't require you to know the number of lines: Code:
:%Y a which yanks all lines into buffer a. Then, when you want to paste, position your cursor where you want it and type this in (without being in command mode): Paste below the cursor position: Code:
"ap or Paste above the cursor position: Code:
"aP |
| Sponsored Links | |
|
|
#5
|
||||
|
||||
|
I tried
Quote:
Quote:
Quote:
I think we sould type : Quote:
|
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
My bad, it was a typo.
|
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
Hi,
Can you elaborate pls. Does the command allow you to paste it another file? I tried but it would not work. Any clue? Thanks |
| Sponsored Links | ||
|
![]() |
| Tags |
| select all text vi, vi select all |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reboot and Select Proper Boot device or insert Boot media in select Boot device and press a key | rpf | Boot Loaders | 0 | 03-22-2011 03:20 PM |
| Epic Editor was not able to obtain a license for your use. Feature Epic Editor :Licen | durgaprasadr13 | Solaris | 1 | 10-13-2008 07:39 AM |
| set EDITOR=vi -> default editor not setting for cron tab | aarora_98 | Shell Programming and Scripting | 6 | 09-13-2008 02:01 AM |
| Pasting text in VI editor from a different editor | harishmitty | UNIX for Dummies Questions & Answers | 10 | 09-10-2008 06:22 PM |
| How to select Test in Vi Editor | Aejaz | UNIX for Advanced & Expert Users | 2 | 04-30-2008 11:55 AM |
|
|