<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Tech-Recipes - Latest Comments in Copy and paste text with vi or vim</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><atom:link href="https://tech-recipes.disqus.com/copy_and_paste_text_with_vi_or_vim_unix_tech_recipes/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 16 Aug 2011 04:19:06 -0000</lastBuildDate><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-287958431</link><description>&lt;p&gt;can't anyone show me the way to type the linux path in VI editor.&lt;br&gt;Do we have the functionality of TAB key in VI editor &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Trunghuynh Bk</dc:creator><pubDate>Tue, 16 Aug 2011 04:19:06 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-189905587</link><description>&lt;p&gt;Copy until the end of a line:&lt;br&gt;y$&lt;br&gt;Copy to the beginning of a line:&lt;br&gt;y^&lt;br&gt;Copy following 4 words:&lt;br&gt;y4w&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Guest</dc:creator><pubDate>Fri, 22 Apr 2011 04:14:19 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-144326218</link><description>&lt;p&gt;Windows in a vim discussion. LOL my sides hurt.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Clint O Baxley</dc:creator><pubDate>Thu, 10 Feb 2011 15:50:26 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-121224805</link><description>&lt;p&gt;Here is how the FTP sequence transpires:&lt;/p&gt;&lt;p&gt;Microsoft Windows XP [Version 5.1.2600]&lt;br&gt;(C) Copyright 1985-2001 Microsoft Corp.&lt;br&gt;C:\&amp;gt;ftp 158.96.235.130&lt;br&gt;Connected to 158.96.235.130.&lt;br&gt;220-QTCP at DOMINONB.&lt;br&gt;220 Connection will close if idle more than 30 minutes.&lt;br&gt;User (158.96.235.130:(none)): xxxxxxx&lt;br&gt;331 Enter password.&lt;br&gt;Password:&lt;br&gt;230 xxxxxxx logged on.&lt;br&gt;ftp&amp;gt; bin&lt;br&gt;200 Representation type is binary IMAGE.&lt;br&gt;ftp&amp;gt; put "C:\Documents and Settings\xxxxxx\Desktop\mysqlinst.savf"&lt;br&gt;200 PORT subcommand request successful.&lt;br&gt;150 Sending file to member SAVF in file MYSQLINST in library QGPL.&lt;br&gt;&amp;gt; Netout :Software caused connection abort&lt;br&gt;426-Cannot write to member SAVF in file MYSQLINST in library QGPL.&lt;br&gt;426 Data transfer ended.&lt;br&gt;ftp: 2293725 bytes sent in 52.08Seconds 44.04Kbytes/sec.&lt;br&gt;ftp&amp;gt;&lt;/p&gt;&lt;p&gt;I have done this file transfer to many other machines but this one is giving me trouble.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CyberSarge</dc:creator><pubDate>Thu, 30 Dec 2010 15:33:45 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-120475179</link><description>&lt;p&gt;copy and paste line :&lt;/p&gt;&lt;p&gt;command is : yyp&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Atrimodi</dc:creator><pubDate>Wed, 29 Dec 2010 00:14:20 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-111428427</link><description>&lt;p&gt;@chrissy - nice! thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tg</dc:creator><pubDate>Tue, 14 Dec 2010 00:12:08 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-110781854</link><description>&lt;p&gt;How do you copy part of a line and paste it into another line at the cursor position (not above or below the current line)?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David</dc:creator><pubDate>Sun, 12 Dec 2010 15:30:26 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-103304228</link><description>&lt;p&gt;hi ...&lt;br&gt; i eed information abou copying the text of pdf /msword file as following.&lt;/p&gt;&lt;p&gt;there atre 5 lines . i want to copy 1st and 5 th line at a time with out continuety.&lt;br&gt;please message me to sutourdot@yahoo.co.in&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sutourdot</dc:creator><pubDate>Fri, 26 Nov 2010 01:40:37 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-98237467</link><description>&lt;p&gt;if I yanked something wrong and I need to cancel it, what should I do?&lt;/p&gt;&lt;p&gt;thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ocean Wy</dc:creator><pubDate>Wed, 17 Nov 2010 04:15:23 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-94146921</link><description>&lt;p&gt;Thank you for all the comments. I found what I was look for at O'reilly 's onlamp website (Thanks to Fuzzy)&lt;/p&gt;&lt;p&gt;For those of you who are still looking for me this worked &lt;br&gt;:100,125w newfile&lt;/p&gt;&lt;p&gt;To see the results, I can open up newfile like so:&lt;/p&gt;&lt;p&gt;:e newfile&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Website Design Montreal</dc:creator><pubDate>Fri, 05 Nov 2010 09:26:55 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-74162318</link><description>&lt;p&gt;It's raining. I will eat a horse for my breakfast..&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Me</dc:creator><pubDate>Thu, 02 Sep 2010 04:19:08 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-41737216</link><description>&lt;p&gt;this is my first time using the vi editor.Can anyone show me how to create user account in solaris 10. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">freddiebarronholmes</dc:creator><pubDate>Fri, 26 Mar 2010 08:50:14 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-10404638</link><description>&lt;p&gt;I realize your post is from 5 months ago from when I'm posting this, saravanan, but for anyone else who may read this:&lt;/p&gt;&lt;p&gt;You have several options that I know of--and I'm not even a vim master.  Just for clarity'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 ":r fileA" (which would copy all of fileA into the open file), and then remove the portions you don't want.&lt;br&gt;2. You could open fileA, execute the command ":split fileB" (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 "y" to yank the lines, switch over to fileB with Ctrl+W Ctrl+W, and then paste the lines with "p".&lt;br&gt;3. Open fileA, select the lines you wish to copy, yank the lines with ""by" (note that's a double-quotation mark in front of the  "b", and that the "b" could be any letter of the alphabet), open fileB, and finally paste the lines with ""bp" (where "b" is the same letter you used to yank).&lt;/p&gt;&lt;p&gt;Note that some of these methods may differ, depending on your version of vim.  And by the by, the files don't have to be in the same folder for these options to work; you simply specify the path to the files (i.e., ":split /path/to/fileB").&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chrissy</dc:creator><pubDate>Tue, 02 Jun 2009 20:18:58 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-8075191</link><description>&lt;p&gt;Nice explanation&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ronni</dc:creator><pubDate>Sat, 11 Apr 2009 04:01:35 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-6372617</link><description>&lt;p&gt;Perfect :)&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Maria</dc:creator><pubDate>Wed, 18 Feb 2009 08:21:56 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-4328692</link><description>&lt;p&gt;How to copy the portion of a file to another file in the same folder in unix?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">saravanan</dc:creator><pubDate>Thu, 11 Dec 2008 11:06:34 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-4021281</link><description>&lt;p&gt;Sorry one change...&lt;/p&gt;&lt;p&gt;CTRL-V is Visual Block Mode&lt;br&gt;simply use the lowercase "v" to enter visual mode and no need to do the "SHIFT-$" (should be SHIFT-4 or $) as mentioned above. So that process now beomes:&lt;/p&gt;&lt;p&gt;go to the line you wish to start yanking/cutting&lt;br&gt;v (enable visual mode)&lt;br&gt;&amp;lt;down arrow=""&amp;gt; (select the lines you wish to yank/cut) &lt;br&gt;or &lt;br&gt;&amp;lt;right left="" arrow=""&amp;gt; (select characters/words in a line)&lt;br&gt;d (cut lines) or y (yank/copy)&lt;/p&gt;&lt;p&gt;now just use 'p' or 'P' as needed to paste below or above cursor!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ddreggors</dc:creator><pubDate>Wed, 26 Nov 2008 05:36:56 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-4021243</link><description>&lt;p&gt;Another nice trick is to use Visual Mode...&lt;/p&gt;&lt;p&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;&amp;lt;down arrow=""&amp;gt; (select the lines you wish to yank/cut)&lt;br&gt;d (cut lines) or y (yank/copy)&lt;/p&gt;&lt;p&gt;now just use 'p' or 'P' as needed to paste below or above cursor!&lt;/p&gt;&lt;p&gt;This is the same as fuzzy's except it allows you to "SEE" what you are yanking.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ddreggors</dc:creator><pubDate>Wed, 26 Nov 2008 05:26:56 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-3899463</link><description>&lt;p&gt;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'x (or d'x if you're cutting and pasting).  Then move the cursor to the point where you want to paste, and type p.  Magic.&lt;/p&gt;&lt;p&gt;You might find something like this helpful as a reference: &lt;a href="http://www.onlamp.com/pub/a/bsd/2001/10/25/FreeBSD_Basics.html?page=1" rel="nofollow noopener" target="_blank" title="http://www.onlamp.com/pub/a/bsd/2001/10/25/FreeBSD_Basics.html?page=1"&gt;http://www.onlamp.com/pub/a...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">fuzzy</dc:creator><pubDate>Wed, 19 Nov 2008 14:27:12 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-3873949</link><description>&lt;p&gt;Good one.,&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kesavan</dc:creator><pubDate>Tue, 18 Nov 2008 01:54:00 -0000</pubDate></item><item><title>Re: Copy and paste text with vi or vim</title><link>http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/#comment-3676995</link><description>&lt;p&gt;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?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">john_doe</dc:creator><pubDate>Tue, 11 Nov 2008 07:11:27 -0000</pubDate></item></channel></rss>