How can I replace dired with something like deer? Any time emacs wants to browse a directory with C-x d
or from a link on the homescreen (from projectile or something), I want to open it in ranger or deer instead of dired. Is that possible?
-
You want github.com/ralesi/ranger.el#installation– NetsuMay 25, 2016 at 19:55
2 Answers
See the find-directory-functions
variable.
By default (in most cases) it results in dired-noselect
being used. You would add a function which used the thing you want to use instead, making sure it has priority over the dired entry (if not replacing it entirely; depending on your exact intentions).
Your function will be called (by find-file-noselect
) with a parameter of the directory path.
For the specific dired bindings like C-x d
, you would want to remap them to your preferred commands.
e.g.
(global-set-key [remap dired] 'my-dired-replacement)
-
While this is a fine answer, it ignores that ranger is a ncurses program and deer a zsh-specific thing.– wasamasaSep 28, 2015 at 6:34
-
I confess that I was presuming these were Emacs libraries (or at minimum, things with existing Emacs integration). Perhaps the question was actually referring to github.com/ralesi/ranger.el which also has a "Minimal Ranger Mode" named
deer-mode
?– philsSep 28, 2015 at 20:13
You can simply use (ranger-override-dired-mode t)
in your init file. See https://github.com/ralesi/ranger.el#setting-as-default-directory-handler