[Top][All Lists]

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

Re: [Ranger-users] page command

From: Michael Longval
Subject: Re: [Ranger-users] page command
Date: Mon, 22 Sep 2014 04:24:57 -0400

Oups, my mistake…. (that’ll teach me to play around with stuff at 4 in the morning)

This actually does NOT work….. 

What hubris….. 

Will fix it and resubmit….

(what shame)


On Sep 22, 2014, at 4:17 AM, Michael Longval <address@hidden> wrote:

Not sure if this is very useful for you, but I did.

I more frequently have to simply read a text file, rather than edit it.

That is why I would like the default action on a “left arrow” into the 3rd column to simply show the file in the $PAGER.

I added this to my $HOME/.config/ranger/rc.conf
(and the command to $HOME/.config/ranger/commands.py)

map P page %f

# This mapping requires the follwing code be added to $HOME/.config/ranger/commands.py

#class page(Command):
#    """:page <filename>
#    Opens the specified file in the $PAGER
#    """
#    def execute(self):
#        theFile = self.fm.thisFile.path
#        theCommand = "$PAGER " + theFile
#        call(theCommand, shell=True)
#    def tab(self):
#        return self._tab_directory_content()


reply via email to

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