On 10/02/09 01:09, Ben Schmidt wrote:
> :set clipboard+=unnamed
>
> perhaps.
>
> Or prefix the command you want to use the system clipboard with "+ (quote 
> plus),
> which I'd recommend more highly myself.
>
> But it's very hard knowing what you want from just six words, and when the v
> command doesn't on its own use the clipboard at all...
>
> Ben.

The v command normally doesn't use any register. However, you can change 
that behaviour by setting selection=unnamed -- something which I don't 
recommend.

Vim-style workflow means that

        y
        d
        p
        P
        :y[ank]
        :d[elete]
        :pu[t]
        :let @@ = expression
        :let variable = @@
        :redir @"
        /^R"
        ... etc. ...

use the unnamed register by default, and don't use the system clipboard 
(which, on Unix running in text mode, might not even exist) unless you 
tell them to, as follows:

        "+y
        "+d
        "+p
        "+P
        :y +
        :d +
        :put +
        :let @+ = expression
        :let variable = @+
        :redir @+
        /^R+
        ... etc. ...

use the system clipboard

        "*y
        "*d
        "*p
        "*P
        :y *
        :d *
        :put *
        :let @* = expression
        :let variable = @*
        :redir @*
        /^R*
        ... etc. ...

use the X-selection when running under X, or the system clipboard in 
non-X graphical OSes such as (but not limited to) Windows. In Windows 
etc., registers + and * are thus synonymous.

Registers + and * are of course only available in Vim versions compiled 
with +clipboard running in an environment where a clipboard is 
available. (For instance, my Vim has +x11 +clipboard, but when run in 
the Linux console it has no access to X and therefore no clipboard.)


Best regards,
Tony.
-- 
The end of the human race will be that it will eventually die of
civilization.
                -- Ralph Waldo Emerson

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to