Loading ...
Sorry, an error occurred while loading the content.

Re: Howto Copy from ex

Expand Messages
  • Tim Johnson
    ... Perhaps, and :) most certainly I haven t made myself clear enough. Here s an example of a specific action I use very frequently: On my .vimrc I have the
    Message 1 of 8 , Oct 23, 2011
    • 0 Attachment
      * Kyle Lippincott <spectral@...> [111023 09:34]:
      > Perhaps I'm confused.
      Perhaps, and :) most certainly I haven't made myself clear enough.
      Here's an example of a specific action I use very frequently:
      On my .vimrc I have the following map:
      noremap <C-G> 2<C-G>

      and when in a buffer I press C-g, I see something
      like this in ex:
      buf 7: "~/.vim/plugin/myscript.vim" 101 lines --18%--
      and I want to copy

      ~/.vim/plugin/myscript.vim

      to the system clipboard.

      So to recap, I want to copy text that is displayed
      in ex
      to the clipboard. Just as if it were in the buffer.

      If I have
      buf 7: "~/.vim/plugin/myscript.vim" 101 lines --18%--
      in ex
      and select
      ~/.vim/plugin/myscript.vim
      and press 'y'
      ~/.vim/plugin/myscript.vim
      will be copied into the % register.

      How then to copy it to the system clipboard?

      In ubuntu, all I have to do is select whatever text in ex
      that I want and it is immediately copied to the system clipboard,
      the same as if it were selected in the buffer.

      I hope that this is clearer.
      thanks for the interest.
      --
      Tim
      tim at tee jay forty nine dot com or akwebsoft dot com
      http://www.akwebsoft.com

      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • björn
      ... I add the line set go+=A to my ~/.gvimrc. This means that the modeless selection is automatically copied on selection (see :h go and :h modeless ).
      Message 2 of 8 , Oct 23, 2011
      • 0 Attachment
        On 23 October 2011 21:31, Tim Johnson wrote:
        > * Kyle Lippincott <spectral@...> [111023 09:34]:
        >> Perhaps I'm confused.
        >  Perhaps, and :) most certainly I haven't made myself clear enough.
        >  Here's an example of a specific action I use very frequently:
        >  On my .vimrc I have the following map:
        >  noremap <C-G> 2<C-G>
        >
        >  and when in a buffer I press C-g, I see something
        >  like this in ex:
        >  buf 7: "~/.vim/plugin/myscript.vim" 101 lines --18%--
        >  and I want to copy
        >
        >        ~/.vim/plugin/myscript.vim
        >
        >  to the system clipboard.
        >
        >  So to recap, I want to copy text that is displayed
        >  in ex
        >  to the clipboard. Just as if it were in the buffer.
        >
        >  If I have
        >  buf 7: "~/.vim/plugin/myscript.vim" 101 lines --18%--
        >  in ex
        >  and select
        >   ~/.vim/plugin/myscript.vim
        >  and press 'y'
        >   ~/.vim/plugin/myscript.vim
        >  will be copied into the % register.
        >
        >  How then to copy it to the system clipboard?

        I add the line

        set go+=A

        to my ~/.gvimrc. This means that the "modeless selection" is
        automatically copied on selection (see ":h 'go" and ":h modeless"). I
        think that is what you are looking for.

        Björn

        --
        You received this message from the "vim_mac" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Tim Johnson
        ... You are correct. Thank you very much! chees -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com -- You received this
        Message 3 of 8 , Oct 23, 2011
        • 0 Attachment
          * björn <bjorn.winckler@...> [111023 12:20]:
          > >  will be copied into the % register.
          > >
          > >  How then to copy it to the system clipboard?
          >
          > I add the line
          >
          > set go+=A
          >
          > to my ~/.gvimrc. This means that the "modeless selection" is
          > automatically copied on selection (see ":h 'go" and ":h modeless"). I
          > think that is what you are looking for.
          >
          You are correct. Thank you very much!
          chees
          --
          Tim
          tim at tee jay forty nine dot com or akwebsoft dot com
          http://www.akwebsoft.com

          --
          You received this message from the "vim_mac" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        Your message has been successfully submitted and would be delivered to recipients shortly.