Closed alphapapa closed 8 years ago
@alphapapa, what happens when you type f
and navigate through the directory path like ../
That does it, thanks.
Maybe the docstring and/or function name should be changed to be a bit more descriptive. I thought ranger-search-files
and Search for files / directories in folder
meant to search for names in the current directory, like typing /
in Ranger. It seems more like a ranger.el version of find-file
, so maybe ranger-find-file
? Although even that seems a bit unintuitive given the Emacs-specific nature of the find-file
command. So maybe something like ranger-goto
with a docstring like:
"Open a file or go to a directory, like `find-file'"
What do you think?
We already have a ranger-find-file
, but lets change it to 'ranger--find-fileand make
ranger-search-filesas
ranger-find-file` with a better doc string. If you are interested in helping out, please submit a PR, otherwise I can get it updated sometime in the next week.
Okay, here's a PR. :) I renamed the functions as you suggested.
I also removed the binding of }
to ranger--find-file
, because in Ranger that runs traverse
, which ranger.el doesn't have, so it seems redundant since RET
and mouse-1
run ranger--find-file
.
I also ran whitespace-cleanup
in a separate commit (I have it in a save hook in Emacs, so I had to keep undoing the cleanup to keep the commits clean... :)
@alphapapa, I took your changes and modified it a bit. I had forgotten that ranger-find-file was an interactive function. I renamed ranger-search-files to ranger-travel ro be consistent with the ranger :travel function.
Cool! :D
I often find myself wanting to navigate to a different directory in a completely different place, but I can't find a command to do this in ranger or deer. For example, in ranger (the Python program), when I press
cd
, I can type the path to a new directory and go to it. I can't seem to find a way to do this in ranger.el. It seems like aranger-read-directory-goto
-type command would be helpful. Am I missing something?Thanks.