LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training 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 09-02-2011, 09:25 AM   #1
xeon123
Member
 
Registered: Sep 2006
Posts: 374

Rep: Reputation: 16
How yank old copied text in VIM?


Hi,

in emacs, it's possible to yank (paste) old text that were copied using several times the key M-y. When we copy text in emacs, it saves it in the buffer. And when we want to yank specific copied text, it goes to the buffer and run through it all.

In a text file, if I do the key sequence just like shown inside <...>, it's possible to paste old text that was saved to the emacs' buffer. For example:

Code:
line1 <M-w>
line2 <M-w>
line3 <M-w>

line3 <C-y>
line2 <C-y M-y>
line1 <C-y M-y M-y>
Is it possible to do the same thing in VIM?
 
Old 09-02-2011, 09:34 AM   #2
xeon123
Member
 
Registered: Sep 2006
Posts: 374

Original Poster
Rep: Reputation: 16
I found the answer.
In the command ":registers", it contains some of the copied text. To paste is this key sequence, for example:
Code:
"2p
This paste the copied text in the register 2
 
  


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
Command to indent text in vim xeon123 Linux - Software 3 03-01-2011 05:05 PM
weird colour behind text in vim matthewhardwick Linux - Software 2 09-20-2007 08:05 PM
Debian Plug Yank aeuzent Linux - General 10 08-08-2005 08:41 PM
copying blocks of text using vim p0rt Linux - Software 2 09-23-2004 03:05 PM
Text Reflow in Vim k4zau Linux - Software 4 02-29-2004 10:32 AM

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

All times are GMT -5. The time now is 05:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration