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

Re: question: vim copy to another place, eg:doc

Expand Messages
  • Nicolas Dermine
    ... hi Lei, 1) juste as you would write a double quote normally. On my swiss keyboard that would be Shift + the key where I have 2, and @. 2) press , * and
    Message 1 of 7 , Jan 2, 2013
    • 0 Attachment



      On Thu, Jan 3, 2013 at 5:44 AM, lei yang <yanglei.fage@...> wrote:
      On 1/3/13, Phil Dobbin <phildobbin@...> wrote:
      > On 01/03/2013 02:15 AM, lei yang wrote:
      >
      >> Hi experts,
      >>
      >> I know in one text,we can use "yy"  to copy something to another place
      >> in text, if I can't to copy something to another place, eg: from a
      >> text,and copy  something using vim, and paste( we don't need to use
      >> vim) something  to another place, how could I do? the real question is
      >> how chould I put something to the vim chipboard. and it can paste to
      >> another place( doc, terminal)
      >
      > I use these mappings to make copy & paste easier:
      >
      > '"Yank content in OS's clipboard
      > vnoremap <leader>yo "*y
      > "Paste content from OS's clipboard
      > nnoremap <leader>po "*p'
      >

      I tried many times.My  vim is built in +chipboard
      question:
      1)"  ---> press shift+" ? to get " ?
      2)"*y, need press at the same time?
      3)how could I select the content I want to copy? can you give me a
      whole process about this ?

      Thanks
      Lei



      hi Lei,

      1) juste as you would write a double quote normally. On my swiss keyboard that would be Shift + the key where I have 2, " and @.

      2) press ", * and y one after the other

      3) you can visually select the content you want to copy.
      For example, in normal mode, if your cursor is on the line you want to copy, pressing V will visually select the line.
      Vj will select the line and the following line. V} will select the line and the following lines in the paragraph.
      If you want to select a word, if your cursor is on the first letter, typing vw will visually select the word.
      If you have mouse support you can also select with the mouse.


      nico



       
      > For this to work in console Vim, Vim would have to be complied
      > +clipboard as has been mentioned. If it has, these would need to be
      > appended to your ~/.vimrc.
      >
      > Cheers,
      >
      >   Phil...
      >
      > --
      > currently (ab)using
      > CentOS 5.8 & 6.3, Debian Squeeze & Wheezy, Fedora Beefy & Spherical,
      > Lubuntu 12.10, OS X Snow Leopard & Ubuntu Precise & Quantal
      >
      >
      >
      >

      --
      You received this message from the "vim_use" 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

      --
      You received this message from the "vim_use" 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.