Results 1 to 7 of 7

Thread: vi : copy and pasting

  1. #1
    Senior Member
    Join Date
    Apr 2002
    Posts
    417

    vi : copy and pasting

    Hi,

    Im using vi

    can anyone show me how to copy one line and paste it somewhere else?

    what about more than one line?

    thanx,

    :wq

  2. #2

    Re:vi : copy and pasting

    To copy the current line, in command mode hit "yy", move the cursor to the line above where you want to insert the new line, then hit "p". (I think "y" is for "yank" and "p" is for "put&quot.

    For five lines (eg), in command mode hit "5yy", move the cursor to the line above where you want to insert, hit "p".

  3. #3

    Re:vi : copy and pasting

    sure! use vim, to copy on line be in command mode and type v, move the curser around the line(s) you wish to copy, then when everytung is highlighted type y.

    now hit P to paste above or p to paste sfter the position you are currently at.


  4. #4

    Re:vi : copy and pasting

    Heh, you didn't think there was going to be just one way, did you? ;D

  5. #5
    Guest

    Re:vi : copy and pasting

    well if i have vim open in a terminal i can just copy/paste stuff by selecting it with my mouse, putting the cursor where it needs to be pasted and then pressing the middle mouse button

  6. #6

    Re:vi : copy and pasting

    Ralinx, just to go off tpoic a little bit, I read somewhere that there is now a kvim available (UK publication "Linux Magazine" - blame them if it's duff information ). I'm pretty sure we had a thread about this a while ago. It is not integrated into the main vim project as yet, but it looks as though it won't be long...

  7. #7
    Guest

    Re:vi : copy and pasting

    yup i already know about it
    i once started a thread about it on this site, but back then when i tried it it was way too early cuz it sucked. i should try a newer version soon

Similar Threads

  1. DVD copy software
    By Compunuts in forum Windows - General Topics
    Replies: 13
    Last Post: 01-13-2010, 03:35 PM
  2. copy RAM to disk
    By imsandy_007 in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 11-17-2006, 08:57 PM
  3. Copy Cds
    By mugs in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 06-16-2004, 11:33 AM
  4. SQL Server 2k: Copy a DB
    By Ashcrow in forum Windows - General Topics
    Replies: 2
    Last Post: 10-14-2003, 09:50 PM
  5. To: Slave Copy
    By in forum General Chat
    Replies: 48
    Last Post: 10-14-2003, 03:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •