Saturday, April 19, 2014

Re: vim: missing register * and #

On 2014-04-19, ping song wrote:

> On Thu, Apr 17, 2014 at 6:46 AM, Tim Chase wrote:
>
> On 2014-04-17 03:13, John Little wrote:
> > Shlomi Fish said:
> >
> > > it's possible the Ubuntu console vim packages don't have that
> > > functionality.
> >
> > No, after installing vim-gnome /etc/alternatives/vi and vim will
> > point to /usr/bin/vim.gtk, so the xterm clipboard (+) and selection
> > (*) should be working.
>
> It's possible that the alternatives didn't get updated.  I *think*
> (Ubuntu being a Debian derivative, and this works on Debian) you can
> do
>
>   sudo update-alternatives --config vi
>
> which will let you manually specify the binary to use.  In this case,
> it *should* point to vim.gtk, so if it doesn't, you can repoint it.
>
> It would also help to know how the OP is invoking it:  if Ping is
> invoking it as "vim.gtk" to obtain the correct version information,
> but then invokes it as "vi" or "vim", it might be using some other
> binary.

> thanks.
>
> I means the "+" and "*" register..
>
> It looks both vi and vim were linked to the right target -- vim.gnome:
>
>
> ping@ubuntu1404:~$  sudo update-alternatives --config vi
> [sudo] password for ping:
> There are 4 choices for the alternative vi (providing /usr/bin/vi).
>
>   Selection    Path                Priority   Status
> ------------------------------------------------------------
> * 0            /usr/bin/vim.gnome   60        auto mode
>   1            /usr/bin/vim.basic   30        manual mode
>   2            /usr/bin/vim.gnome   60        manual mode
>   3            /usr/bin/vim.gtk     50        manual mode
>   4            /usr/bin/vim.tiny    10        manual mode
>
>
> this is very strange -- I actually finally get it worked around, but with a
> weird way that myself still does not quite get it - but it works, only under
> gnu screen:
> as long as I have the following .screenrc , vim *+ register works, if I remove
> this .screenrc, the register gone...
> without gnu screen still no register * and +
>
> isn't it weird ???
>
>
>  #record log in file session-year-month-date.screen.log
>  logfile $HOME/temp/%t-%Y-%m%d-.screen.log
>  #this doesn't work as expected
>  log on
>  #scrollback to 10k lines in cp/paste mode
>  defscrollback 100000
>  # hardstatus line
>  hardstatus alwayslastline
>  #hardstatus alwayslastline "%{Yk}%-w%{.Yk}%n %t%{-}%+w %=%{.w}"
>  hardstatus string "%{= B}:%{= b}: %{= r}[ %{=b G}%H%{= r} ] %= %{=b b}%-w%{=rb
> db}%>%n %t%{-}%+w %=%{= r}[ %{G}%c %{M}%D %m-%d %{r}] %{= b}:%{B}:"
>  # Make the xterm scroller work in screen, also works
>  # with mouse scrollwheel(does not work...)
>  #terminfo xterm*|rxvt ti@:te@
>  # use audio bell
>  #vbell off
>  vbell on
>  vbell_msg " Wuff ---- Wuff!! "
>  #use zshell as default shell
>  #shell zsh
>  #for vim integration, seems no use
>  maptimeout 5
>
>  #caption always "%{+b Yk}%w"
>
>  #looks these no much use...
>  #bindkey -m ) eval "stuff ' '" "writebuf /tmp/sx" "!sh -c 'xsel -b < /tmp/sx'"
>  #bind      ( eval "stuff ' '" "!sh -c 'xsel -b > /tmp/sx'" "readbuf /tmp/sx"
>
>  backtick 1 5 5 uptime
>
>  setenv DISPLAY :0.0

I think the reason that you see those registers only when using
screen is that last line, the one that sets DISPLAY. Without
DISPLAY in the environment, Vim thinks it is not running under X so
it does not enable any features that depend on X.

However, setting DISPLAY manually is not the correct solution. Your
system should set DISPLAY itself. If it is not setting DISPLAY
itself, you need to find out why and fix that.

And please don't top-post to this list.

Regards,
Gary

--
--
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 because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment