<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Copy and paste text with vi or vim</title>
	<atom:link href="http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/</link>
	<description>Computer and technology tutorials and guides</description>
	<lastBuildDate>Sat, 21 Nov 2009 16:14:40 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chrissy</title>
		<link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/comment-page-1/#comment-12024</link>
		<dc:creator>Chrissy</dc:creator>
		<pubDate>Tue, 02 Jun 2009 22:18:58 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-12024</guid>
		<description>I realize your post is from 5 months ago from when I&#039;m posting this, saravanan, but for anyone else who may read this:&lt;br&gt;&lt;br&gt;You have several options that I know of--and I&#039;m not even a vim master.  Just for clarity&#039;s sake, fileA refers to the file you want to copy *from*, and fileB refers to the file you want to copy *to*.&lt;br&gt;1. You could open fileB, execute the command &quot;:r fileA&quot; (which would copy all of fileA into the open file), and then remove the portions you don&#039;t want.&lt;br&gt;2. You could open fileA, execute the command &quot;:split fileB&quot; (which would open fileB to the side of fileA), select the lines you wish to copy from fileA with the combination Shift+V and up/down arrow or j/k, press &quot;y&quot; to yank the lines, switch over to fileB with Ctrl+W Ctrl+W, and then paste the lines with &quot;p&quot;.&lt;br&gt;3. Open fileA, select the lines you wish to copy, yank the lines with &quot;&quot;by&quot; (note that&#039;s a double-quotation mark in front of the  &quot;b&quot;, and that the &quot;b&quot; could be any letter of the alphabet), open fileB, and finally paste the lines with &quot;&quot;bp&quot; (where &quot;b&quot; is the same letter you used to yank).&lt;br&gt;&lt;br&gt;Note that some of these methods may differ, depending on your version of vim.  And by the by, the files don&#039;t have to be in the same folder for these options to work; you simply specify the path to the files (i.e., &quot;:split /path/to/fileB&quot;).</description>
		<content:encoded><![CDATA[<p>I realize your post is from 5 months ago from when I&#39;m posting this, saravanan, but for anyone else who may read this:</p>
<p>You have several options that I know of&#8211;and I&#39;m not even a vim master.  Just for clarity&#39;s sake, fileA refers to the file you want to copy *from*, and fileB refers to the file you want to copy *to*.<br />1. You could open fileB, execute the command &#8220;:r fileA&#8221; (which would copy all of fileA into the open file), and then remove the portions you don&#39;t want.<br />2. You could open fileA, execute the command &#8220;:split fileB&#8221; (which would open fileB to the side of fileA), select the lines you wish to copy from fileA with the combination Shift+V and up/down arrow or j/k, press &#8220;y&#8221; to yank the lines, switch over to fileB with Ctrl+W Ctrl+W, and then paste the lines with &#8220;p&#8221;.<br />3. Open fileA, select the lines you wish to copy, yank the lines with &#8220;&#8221;by&#8221; (note that&#39;s a double-quotation mark in front of the  &#8220;b&#8221;, and that the &#8220;b&#8221; could be any letter of the alphabet), open fileB, and finally paste the lines with &#8220;&#8221;bp&#8221; (where &#8220;b&#8221; is the same letter you used to yank).</p>
<p>Note that some of these methods may differ, depending on your version of vim.  And by the by, the files don&#39;t have to be in the same folder for these options to work; you simply specify the path to the files (i.e., &#8220;:split /path/to/fileB&#8221;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aFree4U</title>
		<link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/comment-page-1/#comment-10269</link>
		<dc:creator>aFree4U</dc:creator>
		<pubDate>Sat, 11 Apr 2009 23:40:54 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-10269</guid>
		<description>thanks for posting this</description>
		<content:encoded><![CDATA[<p>thanks for posting this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronni</title>
		<link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/comment-page-1/#comment-10252</link>
		<dc:creator>Ronni</dc:creator>
		<pubDate>Sat, 11 Apr 2009 06:01:35 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-10252</guid>
		<description>Nice explanation</description>
		<content:encoded><![CDATA[<p>Nice explanation</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maria</title>
		<link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/comment-page-1/#comment-8629</link>
		<dc:creator>Maria</dc:creator>
		<pubDate>Wed, 18 Feb 2009 10:21:56 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-8629</guid>
		<description>Perfect :)</description>
		<content:encoded><![CDATA[<p>Perfect :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: saravanan</title>
		<link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/comment-page-1/#comment-6024</link>
		<dc:creator>saravanan</dc:creator>
		<pubDate>Thu, 11 Dec 2008 13:06:34 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-6024</guid>
		<description>How to copy the portion of a file to another file in the same folder in unix?</description>
		<content:encoded><![CDATA[<p>How to copy the portion of a file to another file in the same folder in unix?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddreggors</title>
		<link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/comment-page-1/#comment-5524</link>
		<dc:creator>ddreggors</dc:creator>
		<pubDate>Wed, 26 Nov 2008 07:36:56 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-5524</guid>
		<description>Sorry one change...&lt;br&gt;&lt;br&gt;CTRL-V is Visual Block Mode&lt;br&gt;simply use the lowercase &quot;v&quot; to enter visual mode and no need to do the &quot;SHIFT-$&quot; (should be SHIFT-4 or $) as mentioned above. So that process now beomes:&lt;br&gt;&lt;br&gt;go to the line you wish to start yanking/cutting&lt;br&gt;v (enable visual mode)&lt;br&gt;&lt;down arrow&gt; (select the lines you wish to yank/cut) &lt;br&gt;or &lt;br&gt;&lt;right/left arrow&gt; (select characters/words in a line)&lt;br&gt;d (cut lines) or y (yank/copy)&lt;br&gt;&lt;br&gt;now just use &#039;p&#039; or &#039;P&#039; as needed to paste below or above cursor!</description>
		<content:encoded><![CDATA[<p>Sorry one change&#8230;</p>
<p>CTRL-V is Visual Block Mode<br />simply use the lowercase &#8220;v&#8221; to enter visual mode and no need to do the &#8220;SHIFT-$&#8221; (should be SHIFT-4 or $) as mentioned above. So that process now beomes:</p>
<p>go to the line you wish to start yanking/cutting<br />v (enable visual mode)<br />&lt;down arrow&gt; (select the lines you wish to yank/cut) <br />or <br />&lt;right/left arrow&gt; (select characters/words in a line)<br />d (cut lines) or y (yank/copy)</p>
<p>now just use &#39;p&#39; or &#39;P&#39; as needed to paste below or above cursor!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddreggors</title>
		<link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/comment-page-1/#comment-5523</link>
		<dc:creator>ddreggors</dc:creator>
		<pubDate>Wed, 26 Nov 2008 07:26:56 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-5523</guid>
		<description>Another nice trick is to use Visual Mode...&lt;br&gt;&lt;br&gt;go to the line you wish to start yanking/cutting&lt;br&gt;CTRL-V (enable visual mode)&lt;br&gt;SHIFT-$ (select to end of line)&lt;br&gt;&lt;down arrow&gt; (select the lines you wish to yank/cut)&lt;br&gt;d (cut lines) or y (yank/copy)&lt;br&gt;&lt;br&gt;now just use &#039;p&#039; or &#039;P&#039; as needed to paste below or above cursor!&lt;br&gt;&lt;br&gt;This is the same as fuzzy&#039;s except it allows you to &quot;SEE&quot; what you are yanking.</description>
		<content:encoded><![CDATA[<p>Another nice trick is to use Visual Mode&#8230;</p>
<p>go to the line you wish to start yanking/cutting<br />CTRL-V (enable visual mode)<br />SHIFT-$ (select to end of line)<br />&lt;down arrow&gt; (select the lines you wish to yank/cut)<br />d (cut lines) or y (yank/copy)</p>
<p>now just use &#39;p&#39; or &#39;P&#39; as needed to paste below or above cursor!</p>
<p>This is the same as fuzzy&#39;s except it allows you to &#8220;SEE&#8221; what you are yanking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fuzzy</title>
		<link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/comment-page-1/#comment-5315</link>
		<dc:creator>fuzzy</dc:creator>
		<pubDate>Wed, 19 Nov 2008 16:27:12 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-5315</guid>
		<description>Nope - just use m to mark the start, with an arbitrary buffer name (so you might type mx).  Move your cursor down to where you want to stop copying, and type y&#039;x (or d&#039;x if you&#039;re cutting and pasting).  Then move the cursor to the point where you want to paste, and type p.  Magic.&lt;br&gt;&lt;br&gt;You might find something like this helpful as a reference: &lt;a href=&quot;http://www.onlamp.com/pub/a/bsd/2001/10/25/FreeBSD_Basics.html?page=1&quot;&gt;http://www.onlamp.com/pub/a/bsd/2001/10/25/Free...&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Nope &#8211; just use m to mark the start, with an arbitrary buffer name (so you might type mx).  Move your cursor down to where you want to stop copying, and type y&#39;x (or d&#39;x if you&#39;re cutting and pasting).  Then move the cursor to the point where you want to paste, and type p.  Magic.</p>
<p>You might find something like this helpful as a reference: <a href="http://www.onlamp.com/pub/a/bsd/2001/10/25/FreeBSD_Basics.html?page=1"></a><a href="http://www.onlamp.com/pub/a/bsd/2001/10/25/Free.." rel="nofollow">http://www.onlamp.com/pub/a/bsd/2001/10/25/Free..</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kesavan</title>
		<link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/comment-page-1/#comment-5240</link>
		<dc:creator>Kesavan</dc:creator>
		<pubDate>Tue, 18 Nov 2008 03:54:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-5240</guid>
		<description>Good one.,</description>
		<content:encoded><![CDATA[<p>Good one.,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john_doe</title>
		<link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/comment-page-1/#comment-5033</link>
		<dc:creator>john_doe</dc:creator>
		<pubDate>Tue, 11 Nov 2008 09:11:27 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-5033</guid>
		<description>I need to yank x amount of lines from the middle of the file.  Am I now suppose to count the amount of lines or what?</description>
		<content:encoded><![CDATA[<p>I need to yank x amount of lines from the middle of the file.  Am I now suppose to count the amount of lines or what?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
