Use Python 3. q
to quit.
Space
: Select file or directory like Ctrl.v/V
: Select continuously like Shift.yy
: Copy files.dd
: Cut files.DD
: Move to trash (has to set maunally).pp
: Paste files.
s
: Open shell in current directory.
Ctrl-n
: Open new tab.Tab
: Switch to next tab.Ctrl-w
: Close tab.
-
f
: Filter files/folders. -
gh
: Go to home directory. -
g/
: Go to root directory. -
gm
: Go to media directory. -
cw
: Rename current file or directory. -
zh
: Show hidden files and directories. -
o
: Change sort order. -
dc
: Compute size of directory under cursor. Size is displayed in status line at bottom.
Enter
orl
: Open in default program.i
: Open in pager.q
to quit.r
: Open with a list of programs.E
: Edit in default editor.
t
: Tag a file."<any>
: Tag with a different label.
m<letter>
: Save as bookmark.`<letter>
: Go to bookmark.um<letter>
: Delete bookmark.
Copy default settings:
ranger --copy-config=all
Configuration files:
~/.config/ranger/
In ~/.config/ranger/rc.conf
:
To add a keybind that moves files to a created directory ~/.Trash/
with DD
:
map DD shell gvfs-trash %s
New tab in current folder:
map <c-t> eval fm.tab_new('%d')
Remap go to media:
map gm cd /run/media/USER
:set vcs_aware true
In ~/.config/ranger/rifle.conf
:
Open text file in new gnome-terminal window:
mime ^text, label editor = gnome-terminal -x vim -- "$@"
Open directory in nautilus file manager:
mime ^inode/directory, has nautilus, X, flag f = nautilus -- "$@"
Put this in .bashrc
:
function ranger-cd {
tempfile="$(mktemp -t tmp.XXXXXX)"
/usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
test -f "$tempfile" &&
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
cd -- "$(cat "$tempfile")"
echo `pwd`
fi
rm -f -- "$tempfile"
}
Then alias:
alias ranger=ranger-cd