Friday, March 25, 2011

RE: Missing selection register (*)?

Tim Chase wrote:
>On 03/25/2011 02:41 PM, Suresh Govindachar wrote:
>
>> On Windows, after yanking a line, :echo @* shows the yanked
>> line. But on Unix, there doesn't seem to be anything in
>> the * register -- it is as though there is no * register at
>> all! Version of vim used on Fedora 14 was:
>>
>> :version
>> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Nov 16 2010 17:05:25)
>> Included patches: 1-56
>> Modified by<bugzilla@redhat.com>
>> Compiled by<bugzilla@redhat.com>
>> Huge version without GUI.
>
> The "without GUI" seems to be the key. If you have a build
> that is GUI-aware, it should be able to access the
> clipboard. You might check the output for "+clipboard" and
> for "+xterm_clipboard"
>
> Also remember that on X, you have both the Selection
> register ("*") and the Clipboard register ("+"). The former
> is for things that have been selected, while the latter is
> for thing's you've explicitly cut/copied.

Thanks. To go from Windows to Unix without any clipboard, I
ended up replacing @* with @" in my vimrc file:

nmap \e :perl my $foo = eval(VIM::Eval('@"'));
\ VIM::DoCommand("let @\" = '" . $foo . " '" );
\ my @pos = $curwin->Cursor();
\ $curbuf->Append($pos[0], $foo);
\ VIM::Msg($foo);<CR>

--Suresh


--
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

No comments:

Post a Comment