Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
~ Switch the view

File Operations

Shortcut Description
<Enter> Open
r open file with
z toggle settings
o change sort order
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

Commands

Shortcut Description
: Execute Range Command
! Execute Shell Command
chmod Change file Permissions
du Disk Usage Current Directory
S Run the terminal in your current ranger window (exit to go back to ranger)

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

Example for substitution

:bulkrename %s

Marker

Shortcut Description
m + <letter> Create Marker
um + <letter> Delete Marker
' + <letter> Delete Marker
t tag a file with an *
t"<any> tag a file with your desired mark

thx to the comments section for additional shortcuts! post your suggestions there!

@CPPF0rev3r

This comment has been minimized.

Copy link

@CPPF0rev3r CPPF0rev3r commented Oct 29, 2019

Thanks!

@Narice

This comment has been minimized.

Copy link

@Narice Narice commented Dec 12, 2019

Nice thanks!
There is a small typo for the N (prev search) command

@heroheman

This comment has been minimized.

Copy link
Owner Author

@heroheman heroheman commented Dec 12, 2019

There is a small typo for the N (prev search) command

Thanks! Fixed it.

@benwoodward

This comment has been minimized.

Copy link

@benwoodward benwoodward commented Feb 20, 2020

Thanks for this. Suggested additions: dd for cut, and pp for paste. Useful for moving files around.

@heroheman

This comment has been minimized.

Copy link
Owner Author

@heroheman heroheman commented Feb 26, 2020

Thanks for this. Suggested additions: dd for cut, and pp for paste. Useful for moving files around.

Thanks for the suggestion - added both.

@dagadbm

This comment has been minimized.

Copy link

@dagadbm dagadbm commented Jun 15, 2020

how can i create a new file?

@gutoxp

This comment has been minimized.

Copy link

@gutoxp gutoxp commented Jun 19, 2020

how can i create a new file?

:e file.txt

it will create and open on the text editor

@Zeioth

This comment has been minimized.

Copy link

@Zeioth Zeioth commented Jun 23, 2020

Since your cheatsheet have a good pagerank, it would be nice to add the markers section:

  • m+letter to create
  • um+letter to delete
  • '+letter to use)
@heroheman

This comment has been minimized.

Copy link
Owner Author

@heroheman heroheman commented Jun 24, 2020

Since your cheatsheet have a good pagerank, it would be nice to add the markers section:

  • m+letter to create
  • um+letter to delete
  • '+letter to use)

Did not know about this. Thanks for the hint and added it.
And I really don't know why its ranked that high. 🤷

@mareksubocz

This comment has been minimized.

Copy link

@mareksubocz mareksubocz commented Jul 25, 2020

I believe there's a mistake in '+letter marks shortcut. It says it deletes the mark. Shouldn't it be to go to it?

@miku86

This comment has been minimized.

Copy link

@miku86 miku86 commented Dec 3, 2020

I believe there's a mistake in '+letter marks shortcut. It says it deletes the mark. Shouldn't it be to go to it?

Yes. You hit ' + the created letter to go to the destination.

Other useful commands:

S: run the terminal in your current ranger window (exit to go back to ranger window)
t: tag a file with an * (great to mark files)
t"<any>: tag a file with your desired mark (I use this for videos I already watched)

I would also add the arrow keys as alternatives for the vim keys j, k, h, l, this makes it easier for ranger beginners.

@dzintars

This comment has been minimized.

Copy link

@dzintars dzintars commented Feb 4, 2021

~ - Switch the views

@kave-me

This comment has been minimized.

Copy link

@kave-me kave-me commented Feb 28, 2021

Perfect

@heroheman

This comment has been minimized.

Copy link
Owner Author

@heroheman heroheman commented Mar 5, 2021

I believe there's a mistake in '+letter marks shortcut. It says it deletes the mark. Shouldn't it be to go to it?

Yes. You hit ' + the created letter to go to the destination.

Other useful commands:

S: run the terminal in your current ranger window (exit to go back to ranger window)
t: tag a file with an * (great to mark files)
t"<any>: tag a file with your desired mark (I use this for videos I already watched)

I would also add the arrow keys as alternatives for the vim keys j, k, h, l, this makes it easier for ranger beginners.

thx for the suggestions, did not know about the t * marker!

@badele

This comment has been minimized.

Copy link

@badele badele commented Mar 19, 2021

+ + letter + letter | add file permissions (chmod)
- + letter + letter | remove permissions (chmod)

@miku86

This comment has been minimized.

Copy link

@miku86 miku86 commented Mar 31, 2021

I believe there's a mistake in '+letter marks shortcut. It says it deletes the mark. Shouldn't it be to go to it?

@heroheman Can you fix this?

Old: ' + <letter> Delete Marker

New: ' + <letter> Go to Marker

Thank you! :)

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