[Top][All Lists]

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

Re: [Ranger-users] Emacs bindings

From: Roman Z.
Subject: Re: [Ranger-users] Emacs bindings
Date: Thu, 23 Aug 2012 14:35:33 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Aug 23, 2012 at 06:49:26AM -0300, Martín Cigorraga wrote:
> Hi all, it have been a while since I first met ranger but it was until
> today I realized how much it simplifies my daily console use, specially the
> work with text files =)
> I'm a heavy Emacs user and I read somewhere that ranger can be customized
> to run with Emacs keybindings, is this true? Alas, I can't remember where I
> read about this so I would greatly appreciate if you can point me in the
> right direction.

Hi Martin,

There's a configuration file that lets you change key bindings. You can
copy the default file to ~/.config/ranger/rc.conf by running

  ranger --copy-config=rc

Then you can redefine keybindings with the 'map' command.  You might
want to add something like

  map <C-n> move down=1
  map <C-n> move up=1
  map <A-v> move down=1 pages=True
  map <C-v> move up=1   pages=True

Take a look at the existing key bindings for a reference.

There is one caveat:  You shouldn't keep the whole rc.conf in your
~/.config/ranger directory because if the default one changes, you still
have the old one.  It's better to have a small rc.conf that only
contains the things that you added yourself.

> Also, one of the features I love most about ranger is the ability to
> preview text files on the fly and I have a question about this: is it
> possible to scroll the previewed file?
> Regards!
> Martin

If you press i (for inspect), the preview is enlarged and you can scroll
around with hjkl or ^N/^P.


reply via email to

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