Skip to content

Instantly share code, notes, and snippets.

@simonthompson99
Forked from heroheman/ranger-cheatsheet.md
Last active April 12, 2022 20:00
Show Gist options
  • Save simonthompson99/0647eabab2c27c872cda50fc57d681fb to your computer and use it in GitHub Desktop.
Save simonthompson99/0647eabab2c27c872cda50fc57d681fb to your computer and use it in GitHub Desktop.
[Ranger Cheatsheet] Cheatsheet for common Ranger commands #ranger # cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts

Movement

Shortcut Description
k up
j down
h parent directory
l subdirectory
gg go to top of list
G go t bottom of list
J half page down
K half page up
H History Back
L History Forward

File Operations

Shortcut Description
<Enter> Open
r open file with
ef open file in new tmux window
z toggle settings
o change sort order (e = extension, c = date, n = name)
zh view hidden files
cw rename current file
yy yank / copy
dd cut
pp paste
/ search for files :search
n next match
N prev match
<delete> Delete

Sorting and Filtering

Shortcut Description
oc/C Sort by creation date ascending/descending
on/N Sort by filename ascending/descending
oe/E Sort by file extension
zf <substring> Filter for files containing a substring
zh Show hidden files

Commands

Shortcut Description
: Execute Range Command
! Execute Shell Command
chmod Change file Permissions
du Disk Usage Current Directory
td Open current directory in tmux split
S Exit to shell in current directory

Tabs

Shortcut Description
C-n Create new tab
C-w Close current tab
tab Next tab
shift + tab Previous tab
alt + [n] goto / create [n] tab

File substituting

Shortcut Description
%f Substitute highlighted file
%d Substitute current directory
%s Substitute currently selected files
%t Substitute currently tagged files

Marker

Shortcut Description
m + <letter> Create Marker
um + <letter> Delete Marker
' + <letter> Delete Marker

Example for substitution

:bulkrename %s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment