I have recently moved from dired to ranger. While using it on a regular work day, I noticed there isn't any command for creating a new directory.
Is there a workaround or am I missing something?
I am assuming this is talking about the https://github.com/ralesi/ranger.el package available from Melpa. There are several things you can do
Use "!" to run a command. This is made slightly tricky as ranger seems to want to pass the filename you are on to the command, so something like mkdir wibble ; :
could be used on unix systems.
Switch to dired mode using control-p
, then use +
to call dired-create-directory
, and then control-p
to switch back to ranger
Add
(require 'ranger)
(define-key ranger-normal-mode-map (kbd "+") #'dired-create-directory)
to your startup file.
Whilst ranger is quite pretty, I dislike the way it takes away standard ways to discover things. In particular binding control-h to toggle hidden (dot) files is bad.
To create a new directory you can use either of the two commands (Ranger v1.7.2-1 on Arch Linux):
F7
:mkdir
You can also assign your custom hotkey by editing file
~/.config/ranger/rc.conf
The quickest way is dired-create-directory
(bound by default to + in dired
). It will prompt you for the name of the directory to create.