Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-02-2011, 10:25 AM   #1
Registered: Sep 2006
Posts: 374

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


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:

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, 10:34 AM   #2
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:
This paste the copied text in the register 2


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 06:05 PM
weird colour behind text in vim matthewhardwick Linux - Software 2 09-20-2007 09:05 PM
Debian Plug Yank aeuzent Linux - General 10 08-08-2005 09:41 PM
copying blocks of text using vim p0rt Linux - Software 2 09-23-2004 04:05 PM
Text Reflow in Vim k4zau Linux - Software 4 02-29-2004 11:32 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:23 AM.

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