[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 10:00:21 -0700
User-agent: Mutt/1.5.20 (2009-06-14)

On 2013-08-28, emma sculateur wrote:
> Thanks for the answer Gary.
> The problem is that I don't have this rifle.conf.
> $ ranger --copy-config=rifle.conf
> Unknown config file `rifle.conf'
> $ ranger --copy-config=rifle
> Unknown config file `rifle'
> 'locate rifle', does not give anything. I precise that I installed ranger 
> using
> the usual fedora repos.
> In .config/ranger I have :
> apps.py  apps.pyo  bookmarks  commands.py  commands.pyo  history  keys.py 
> keys.pyo  options.py  options.pyo  scope.sh  tagged
> I tried to edit apps.py. I have this section where I just changer vim into 
> gvim
> -v, but it didn't work :
> # Often a programs invocation is trivial.  For example:
> #    vim test.py readme.txt [...]
> # This could be implemented like:
> #    @depends_on("vim")
> #    def app_vim(self, c):
> #        return tup("vim", *c.files)
> # Instead of creating such a generic function for each program, just add
> # its name here and it will be automatically done for you.
> CustomApplications.generic('gvim -v', 'fceux', 'elinks', 'wine', 'zsnes',
> 'javac')

You're using an older version of ranger than I am.  You're using
1.4.2 and I'm using 1.6.1, a recent version from the git repository.
I knew the configuration scheme had changed, but I didn't know when.

There may be a way to modify one of those config files to use "gvim
-v" instead of "vim" but I don't know how myself.

At this point, what I would do would be to put a small wrapper
script somewhere in your path ahead of wherever vim is.  If you have
a ~/bin directory, I would put it there.  Name it "vim" and put this
in it:

    exec gvim -v "$@"

You may need to execute

    hash -r

to clear your shell's cache and force your shell to search for "vim"
again in $PATH.


reply via email to

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