[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ranger-users] No access to X11 clipboard or selection when vim is l

From: Gary Johnson
Subject: Re: [Ranger-users] No access to X11 clipboard or selection when vim is launched via ranger
Date: Wed, 28 Aug 2013 08:09:02 -0700
User-agent: Mutt/1.5.20 (2009-06-14)

On 2013-08-27, emma sculateur wrote:
> Hello,
> I just started to use ranger. I think I'm going to love it, the only thing is 
> :
> when I open a file in vim with ranger, I can't access the x11 clipboard or the
> selection. ==> I cannot yank/paste at all !
> For the X11 clipboard I have this in my vimrc :
>             nmap <C-p> "+p
>             nmap <C-y> "+yy
>             vmap <C-d> "+d
>             vmap <C-p> d$"+p
>             vmap <C-y> "+y
> and I have an alias that launch gvim -v instead of vim... I thought ranger
> really launched vim instead of gvim -v, and I tried to change that in
> rifle.conf as indicated in the man, but I can't find this file.
> For the selection buffer, it is more annoying, and I have no idea of how to
> make it work.

The reason you can't use the X11 clipboard is, as you suspected,
that ranger is invoking vim, not "gvim -v" as your editor.

Your alias works from your shell, but it is not exported to other
programs run from that shell, so ranger does not see the alias.

Personal configuration files such as rifle.conf are not created
unless you ask them to be.  To get a copy of rifle.conf into your
~/.config/ranger directory, execute

    ranger --copy-config=rifle

Then open the file ~/.config/ranger/rifle.conf and search for
EDITOR.  Change each instance of the string



    gvim -v

and save that file.  There should be three such instances.  The
first one should now look like this:

    mime ^text,  label editor = gvim -v -- "$@"

That should do it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]