Vim - copy to clipboard without mouse and paste to other application

I can copy & paste in editor vim.. andI know copying with mouse.. how to set vim to select all lines and copy them without mouse and paste it to other application like leafpad with Ctrl+V or with "paste" in options? it is possible in vim?
Last edited by xhc (2012-05-26 18:10:31)

Parecelite etc. isn't needed for that...
You have the choise of using either primary selection or clipboard...
For primary selection, you use vim's visual mode to mark text(not yank it, just mark), and then in whatever other app paste primary selection with 'shift+ins'.
For clipboard, you need e.g. the gvim package from the arch repo's, which includes a vim with clipboard support enabled, and then you mark the text and then copy it to clipboard with '"+y', that is 'double-quote+plus+y' and then paste in whatever clipboard capable app with ussually ctrl+v.
Finally, you can configure vim to always yank to clipboard(in addition to primary-selection), so you can mark text, press y, and then ctrl+v in whatever clipboard capable app afterwards; to do that add 'set clipboard=unnamedplus' to your .vimrc. (note, vim clears whatever it self has placed in the clipboard whenever quiting vim, so keep vim open after you have copied from it and untill after you've pasted from it...)
Edit: Beaten by kniren for some of the info
Edit2: Using Primary selection with x11 apps also needs either vim from the gvim package, or a custom built one...
Last edited by mhertz (2012-05-26 19:21:08)

Similar Messages

  • Cut, copy and paste from other applications not completely cleared

    Hi,
    I'm using build 573.
    When I cut, copy and paste inside Adobe Story synopsis or research content types, I often get text from other applications pasted instead of the text I have cut or pasted from my working document.
    Just to say, it's a little bit annoying when everything else about Adobe Story is so lovely.
    regards
    Martyn

    Hi Anubhav,
    Appologies for the delay in replying.
    0. Apple Mac Book Pro OS X
    1. I mainly use the client on my macbook, or samsung netbook running windows xp and then sync over the web
    2. using cmnd-c, cmnd-v, cmnd-x for mac, ctrl-c, ctrl-v, ctrl-x on windows netbook
    3. I use safari latest version on the mac, and chrome or opera on the netbook.
    Martyn

  • After updating numbers and pages I can no longer copy multiple cells from numbers and paste and match style to pages.

    After updating numbers and pages I can no longer copy multiple cells from numbers and paste and match style to pages.  I used to be able to select multipule cells in a row (such as company name, address, etc.) then paste and match style on to a pages letter. I found the paste and match style option in the edit menu, however it will only work one cell at a time. Before the update is was working great.

    For diagnosing purpose thy the procedure in a new user account and see if it works there. You create a new user account in the System Preferences > Accounts. If it works in the new account it is probably a corrupt plist file that needs to be deleted.

  • How do I copy a photo from iPhoto and paste it into a text/Pages document?

    How do I copy a photo from iPhoto and paste it into a text/Pages document (using iMaC)?

    Use the Media browser in Pages and just drag the image over.

  • Copy a table in Safari and paste special, as text, to an Excel worksheet

    I am attempting to write Applescript code to copy a table in Safari and paste special, as text, to an Excel worksheet.
    When I perform the operation manually, all the rows of the Safari table are pasted into Excel in a single column, i.e. after all of the data in a row of a table is pasted vertically into Excel,the next row is pasted in the next open cell below in the same column, as I need it.
    When I use the applescript line..."paste special on worksheet format text" Excel pastes the table data in rows AND columns , like the table looks in Safari, but I do not want it pasted this way.
    Any ideas on how to get my Applescript code to perform the same manual operation?
    Thanks!

    I do not know what Excel you have, but to copy a table from a Safari's page, you could use the table tags of the page's source to get the table you want.
    That is, use text item delimiters.
    deivy

  • Why copying from particular pdf files and pasting to Words introduces improper fonts?

    Why copying from particular pdf files and pasting to Words introduces improper fonts?
    I’m wondering copying from particular pdf files and pasting to Words introduces improper fonts! Is there some workaround to avoid this problem?
    Thank you for the help
    Best
    Jamal

    Thank you for the answer.
    if i save it as Word, then the all goes fine.
    my issue here, is why in particular cases copying and pasting from the pdf file to Word is working very well, but in others, it is not!
    what might be the reason?
    best
    Jamal

  • Hi, I finally got lucky and past the "other" memory status issues when syncing. Now I'm "waiting for changes to be applied" sync stuck all night (itunes yesomite iPhone 6 plus). is this a bug? I have not had a single successful sync with yesomite.

    hi, I finally got lucky and past the "other" memory status issues when syncing. Now I'm "waiting for changes to be applied" sync stuck all night (itunes yesomite iPhone 6 plus). is this a bug? I have not had a single successful sync with yesomite.
    please help. this issue prevents music from syncing. I have set the sync setting to convert songs to 192kbps AAC to save space, I figure that could slow the sync
    down, but it's hanging indefinitely (I've left it for 24 hours with out it completing.)
    the the only music that appears on the phone are songs purchased from the iTunes Store. 95% of my collection are rips from my CDs.
    thank you for any help!

    Yeah it's pretty sad that $1000 phone they put out you such cheap memory It causes issues, I have iPhone 6+128 GB actually this is the second brand-new one they gave me because they keep affording it trying to act like that's not the issue because they're too stupid to know how to check what memory is in each one before they give it to me when I have told them multiple times my back up runs perfectly fine on two 5s phones and a 6 64GB of course running MLC memory.
    I told them it's because just like the write ups say I have 809 apps but I have not even put all my music on the phone so I'm still running 50 to 60 gigs free and it crashes and reboots itself sometimes in multitasking and more often than it does that in between multitasking I get a black screen for 1 to 2 seconds in between apps and upon start up the Apple logo screen will flicker and do weird things, One of the genius idiots asked me if I could just delete some of my apps, really that's the answer to fix the phone the customer needs to limit the amount to apps they put on their phone, why the **** get a 128 gig if you can't put on anything you want to it guess they need to start selling them saying you can only put a limited number of apps on them, it's really is a **** joke, I have over $20,000 of Apple merchandise easily and always get the new phone every year but I'm starting to reconsider my decisions in the future because this company is starting to go downhill, The reason water not recalling the phones is because they're dealing with their top-of-the-line thousand dollar phones in this case and most people don't have over two or 300 apps so they're not having as many issues, so basically they have messed up phones they just don't know it in their hands and Apple is just too **** greedy to recall the phones, they'd rather sell customer spends that only work half ***.
    Stuff like this will be the downfall of their company, all the people that stay with them because as long as you don't jailbreak their stuff it normally just works without issue will be soon jumping ship if stuff like this keeps up, because I can guarantee they got me thinking now.
    not that I wanted to know or should I be expected to but I even offered for them to open up my brand-new phone and just replace the memory to MLC memory which is something I shouldn't have to do with a brand-new **** phone, they should just make one with the right memory and give me a new phone, actually just don't sell customers that buy the top-of-the-line phone from you trash ones in the first place that would be a great option.
    what burns me up the most is when you talk to AppleCare and Genius Bar they try to act like the issue isn't there and they're unaware of it, they say that Apple hasn't come out with any information about it, yeah that's because they don't want to recall the trash.
    Apple has became nothing better than your run-of-the-mill company, android is becoming just as good as they are sad to say this since I have been an Apple fan for so long but there is no excuse for BS like this they have been looking for options to fix my phone for a month now this is not the way you should treat loyal customers, I would've been better off keeping my 5S and in the future just switching to android.
    it's pretty sad that the company has no idea how to check which memory is in their **** phone and even after I offered to let them just replace the memory in my new phone by opening up my brand-new phone to replace it they have no idea how to do that either, yeah Genius Bar sure, I think that should change the name to idiot bar and Apple don't care instead of Apple care.

  • I am trying to install microsoft office and installer is not accepting my apple id and password. I have tried by user id and password in other applications and it is working

    i am trying to install microsoft office and installer is not accepting my apple id and password. I have tried my appleid and password in other applications and it is working

    Office requies a MS serial number, not your Apple ID. Are you attempting to install the Office 360 pay as you go version?

  • Urxvt: copy current line without mouse

    I want Urxvt to copy whatever I just wrote in the terminal without using the mouse, I just want to type a single combination such as Ctrl-m. I'm not sure if there's any easier way to do it, so I tried writing a perl function:
    sub tox {
    my ($self) = @_;
    my $text;
    my $PS1='>>> ';
    # get the last non-empty line
    for (my $i = 0; $i < $self->nrow; $i ++) {
    my $line = $self->line($i);
    next if ($line->beg != $i);
    next unless $line->t;
    $text = $line->t;
    # remove PS1, rprompt and copy to clipboard
    $text =~ s/$PS1//;
    my $rprompt = ( ${$self->env}{'PWD'} eq ${$self->env}{'HOME'} ?
    '~' : ${$self->env}{'PWD'} );
    $text =~ s/\s*$rprompt$//; # remove spaces and rprompt
    system( "echo -en \"" . $text . "\" | xsel -i" );
    The problem is, I'm not sure how to remove the rprompt, which shows the working directory. I tried to obtain the working directory with ${$self->env}{'PWD'}, but the value seems to be the working directory of the parent terminal. e.g., when I open urxvt, cd to /tmp and open urxvt inside this terminal, then PWD is /tmp. If I cd to /home, PWD remains /tmp. Same problem with $HOME.
    If anyone has an idea how to obtain the actual working directory or maybe knows another possibility, I'm glad to hear it.
    Last edited by sigma91 (2013-05-02 16:59:47)

    The above code uses xsel to paste to clipboard:
    system( "echo -en \"" . $text . "\" | xsel -i" );
    So the perl module doesn't solve my problem.
    Here's an example of what I'm trying to achieve:
    I'm in the folder /tmp and I just typed 'fdisk -l'. The terminal looks like this:
    >>> fdisk -l /tmp
    >>> is my PS1, on the right is my rprompt, which shows the current directory (/tmp). The variable $text gives me this whole string, but I just want to copy 'fdisk -l'. The PS1 can easily be deleted using
    $text =~ s/$PS1//;
    my question is, how to delete the rprompt?

  • Copying text in a column and pasting it into email

    I'm trying to copy a list of email addresses that are in a column in Numbers. It either won't let me paste it in an email at all or if I can get it pasted in another place it pastes it almost like it was an image, not individual lines of email addresses.
    Any help?

    eyeless wrote:
    Your first question was:question1
    Any idea about how to copy a column of e-mail addresses from Numbers into Text Edit or Textwrangler for example without needing to go via yet another program? Why does not copy and paste work on simple text in Numbers?
    After my response, you change to a completely different question. So, of course my response to question1 may be inaccurate for question2.
    question2
    Anyway -- what I stated was thanks for the help -- it works as you say, but does not really solve my or most peoples problems with this (I have now realised).
    Because dropping in address groups from the Addressbook will still format the addresses so that they cannot be copied (intuitively/plainly as in Excel). One could however copy them and paste into a new document once again, but then you have to manually drag the table for hours to reach the length needed to be able to paste the addresses into the table, in order that one subsequently may be allowed to actually copy the addresses normally. Numbers also default to hiding many relevant columns when dragging and dropping Addressbook groups (one has to unhide them).
    I just find it odd that a Mac app should be even more difficult to actually use than even the hopeless Excel ... . /Jerry
    This question is not really related to Numbers but to AddressBook.
    It's quite funny because from time to time, on this forum, some users are annoyed because when they copy rows from Numbers, hidden rows are copied too
    while you are annoyed because , when you copy from AddressBook, hidden fields are not copied.
    In your message, if I understand it correctly, there is something which seems to be wrong.
    When we paste hudreds of rows of datas in a table, there is no need to create the table's rows by hand. Just paste at the bottom of the table and the new rows will be created automatically.
    Yvan KOENIG (from FRANCE jeudi 15 mai 2008 19:15:38)

  • How do you copy images from the internet and paste them on Microsoft Word

    I'm trying to copy images from the internet and trying to paste them on to Microsoft Word and Powerpoint for an assignment but it's not working. I tried to use copy and paste and then paste special but nothing is working. Saving the image onto documents and trying to open them on Microsoft Word still doesn't work.
    PLEASE HELP!!!
    Thank you

    Hi Lily, and welcome to Apple Discussions.
    A screenshot can capture almost anything you're viewing. Hold the command and shift keys down, then press the 4 key and release all keys. Hold down the mouse button and drag the cursor to the size/area of the image you want to capture. Release the mouse button and you've captured the image. Remember that it is the individual's responsibility to respect copyright laws.

  • Why can I not copy text from a file and paste into "File Name" when saving?

    I thought I used to do this but I cannot copy a string of text from within AI (CS5, CS6 or CC) then "save as" and paste into the "file name" field. Why would this be?
    This proceedure works fine in Photoshop.
    Mac OSX 10.7.5.

    I am copying the characters not the object. Something seems to have changed at the system level. I can paste the text to other applications (Skype, Word, etc.) but not the "Save" dialog. I have been pasting the text to a Skype message window and re-copying. Then it will paste into the save dialog. Weird.
    I see you are on 10.6.8. Maybe it's a system difference.

  • Copy a graphic from java and paste it to WORD

    Hi all,
    Is it possible to copy a graphic from a java applet and paste it in a word document ?
    Any example should be appreciated.
    Thanks ? ;-)
    Olivier

    This is not possible on a generic applet because the browser security does not allow access to the system clip board. This can be done in a Java application or a signed applet.

  • How do you copy an equation from grapher and paste it into numbers?

    Hi, my free trial for Mathtype ran out but I still need to be able to write equations and copy them into pages and numbers for my coursework. Is there a free alternative to Mathype that also carries out this function? Or, alternatively, is there a way to copy an equation from the grapher app that comes with Macs and paste it into numbers/pages. Thank you.

    select the equation in Grapher, copy
    click in a Numbers sheet, paste

  • How do I copy a color from Kuler and paste it to a word document?

    How do I copy a color theme from Kuler and paste it to a word document?

    Unless there is something unusual about the table, it should copy in by selecting in Pages, selecting Copy, moving to Keynote, tapping, seelcing paste.
    If the table structure is copying in, but you can't see the text (is that what is happening?), you might try selecting ghe table and changing the text color using the formatting tool.

Maybe you are looking for

  • My xml publisher report not display chart/graph in r12 apps

    dear all my xml publisher report is not showing chart/graph in oracle apps r12.1.1, but it's locally preview fine in MS word when i register rtf template in apps it just show data in xml not apply template without chart/graph it's work fine in apps p

  • Windows Update and the Windows Error reports

    31/08/2014 08:41         Windows Error Reporting        Fault bucket 124661653, type 21&#x000d; Event Name: WindowsUpdateFailure&#x000d; Response: Not available&#x000d; Cab Id: 0&#x000d; &#x000d; Problem signature:&#x000d; P1: 7.6.7600.320&#x000d; P2

  • Create WORKSPACE on APEX 2.1 problem

    Hello, I try to create a workspace on an Application Express 2.1.0.00.39 without success. My System: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product PL/SQL Release 10.2.0.1.0 - Production CORE     10.2.0.1.0     Production TNS for Li

  • How to center a new- opened window page?

    let's say i have 2 jsp files. i have a hyperlink in page 1, if i click that hyperlink, a pop up window will appear, how will i let that pop up window appear in center? thanks

  • FW8 Can't Seem To Create Disjoint Rollover Effect

    Hello, I used previous versions of FW to create "disjoint rollover" effects without any problem. This time I'm using FW8 to create the same effect but so far it has proved unsuccessful, I have even tried the step by step instruction of "help" menu wi