ranger-users
[Top][All Lists]
Advanced

[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: Hut
Subject: Re: [Ranger-users] No access to X11 clipboard or selection when vim is launched via ranger
Date: Thu, 29 Aug 2013 12:47:52 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Aug 28, 2013 at 09:42:41AM -0700, emma sculateur wrote:
> 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')

1. remove 'gvim -v' entry in CustomApplications.generic(),
2. add this code to the class:

    def app_vim(self, c):
        return tup("gvim", "-v", *c.files)

And make sure the indentation is correct, i.e. if the file uses tabs,
you should also use tabs.  If the file has 2 spaces per indentation,
also use 2 spaces, etc.



reply via email to

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