RANGER(1)
πΈ RANGER(1) β the ranger manual, bestie edition πΈ
okay so. this is RANGER(1), the manual for ranger, and i'm gonna walk you through the whole thing like we're texting at 2am. grab a snack π
β¨ NAME β¨
ranger β a visual file manager. yes. that's the whole name section. it's giving minimal icon energy π
π¦ SYNOPSIS π¦
ranger [--version] [--help] [--debug] [--clean] [--cachedir=directory]
[--confdir=directory] [--datadir=directory] [--copy-config=which]
[--choosefile=target] [--choosefiles=target] [--choosedir=target]
[--selectfile=filepath] [--show-only-dirs] [--list-unused-keys]
[--list-tagged-files=tag] [--profile] [--cmd=command] [path ...]
that's the whole vibe. flags then paths. copy it exactly, don't be cute with it π
π DESCRIPTION π
ranger is a console file manager with VI key bindings.
that's it. that's the description. short, iconic, no notes. π
π RESOURCES π
this manual is literally your blueprint for using and configuring ranger, bestie.
inside ranger, you can press ? for a list of key bindings, commands or settings. it's like a little in-app help menu and it slays.
README has the install instructions.
HACKING.md has the guidelines for code modification β read it if you're gonna touch the code, fr fr.
the directory doc/configs contains configuration files. they're usually installed to /usr/share/doc/ranger/config and you can get them with ranger's --copy-config option. π«Ά
the directory examples contains reference implementations for ranger plugins, sample configuration files and some programs for integrating ranger with other software. they're usually installed to /usr/share/doc/ranger/examples.
the man page of rifle(1) describes the functions of the file opener.
and the LINKS section of this man page has further resources β more on that later in the page, stay tuned β
π POSITIONAL ARGUMENTS π
path ...β every path you give gets opened in a tab, and if that path is a file, it gets selected. if you omit this entirely, it's equivalent to providing the current directory. so like, doing nothing =.π
π OPTIONS π (the main character section)
-d,--debugβ activates debug mode: whenever an error occurs, ranger will exit and print a full traceback. the default behavior is to merely print the name of the exception in the statusbar/log and try to keep running. so debug mode is the dramatic one that walks out π-c,--cleanβ activates clean mode: ranger will not access or create any configuration files, nor will it leave any traces on your system. useful when your configuration is broken, when you want to avoid clutter, etc. ghost mode. no fingerprints. π«₯--cachedir=dirβ changes the cache directory of ranger from$XDG_CACHE_HOMEor~/.cache/rangerto"dir".-r dir,--confdir=dirβ changes the configuration directory of ranger from$XDG_CONFIG_HOMEor~/.config/rangerto"dir".--datadir=dirβ changes the data directory of ranger from$XDG_DATA_HOMEor~/.local/share/rangerto"dir".--copy-config=fileβ creates copies of the default configuration files in your local configuration directory. existing ones will not be overwritten, so no surprise sabotage π possible values:all,commands,commands_full,rc,rifle,scope.
Note: you may want to disable loading of the global configuration files by exporting RANGER_LOAD_DEFAULT_RC=FALSE in your environment. see also: FILES, ENVIRONMENT.
--copy-config=commands will copy only a small sample configuration file with a thoroughly commented example. it's recommended to keep this file tidy to avoid getting defunct commands on ranger upgrades. the full default commands.py can be copied with --copy-config=commands_full, but that file will be ignored by ranger and serves only as a reference for making your own commands. so like, it's a mood board, not a plugin π₯
--choosefile=targetfileβ lets you pick a file with ranger. this changes the behavior so that when you open a file, ranger will exit and write the absolute path of that file intotargetfile. one file, one path, done β¨--choosefiles=targetfileβ lets you pick multiple files with ranger. this changes the behavior so that when you open a file, ranger will exit and write the absolute paths of all selected files intotargetfile, adding one newline after each filename. multi-select slay πΈ--choosedir=targetfileβ lets you pick a directory with ranger. when you exit ranger, it will write the last visited directory intotargetfile. bye bestie, here's where i was π--selectfile=targetfileβ opens ranger withtargetfileselected. this is a legacy option, superseded by the behavior for the POSITIONAL ARGUMENTS. it's giving old money, we still respect it though π--show-only-dirsβ displays only the directories. may be used in conjunction with--choosedir=targetfile. directory-only mode, folders only, no files allowed at the function π«--list-unused-keysβ lists common keys which are not bound to any action in the"browser"context. this list is not complete β you can bind any key that is supported bycurses: use the key code returned bygetch(). so it's a starter pack, not the whole menu π--list-tagged-files=tagβ lists all files which are tagged with the given tag. Note: tags are single characters. the default tag is"*".--profileβ prints statistics of CPU usage on exit. numbers on numbers, she's data-driven π--cmd=commandβ executes the command after the configuration has been read. use this option multiple times to run multiple commands. spam it, it's allowed π«Ά--versionβ prints the version and exits.-h,--helpβ prints a list of options and exits.
π§ CONCEPTS π§
this part explains how certain parts of ranger work and how they can be used efficiently. it's the lore episode, but make it useful β
π TAGS π
tags are single characters which are displayed left of a filename. you can use tags however you want β it's your system, bestie.
press "t" to toggle tags and "ut" to remove any tags of the selection. the default tag is an Asterisk ("*"), but you can use any tag by typing <tagname>.
so yes: single characters, your rules, go wild π
π¦ PREVIEWS π¦
by default, only text files are previewed. but you can enable external preview scripts by setting the options "use_preview_script" and "preview_files" to true. glow-up unlocked β¨
this default script is %rangerdir/data/scope.sh. it contains more documentation and calls to many external programs to generate previews. they are automatically used when available but completely optional.
for general usage:
"file"for determining file types"chardet"(Python package) for improved encoding detection of text files"sudo"to use the"run as root"feature"python-bidi"(Python package) to display right-to-left file names correctly (Hebrew, Arabic)
for enhanced file previews (with scope.sh):
"img2txt"(from"caca-utils") for ASCII-art image previews"w3mimgdisplay","ueberzug","mpv","iTerm2","kitty"(or other terminal supporting the Kitty graphics protocol),"terminology"or"urxvt"for image previews"convert"(from"imagemagick") to auto-rotate images and for image previews"rsvg-convert"(from"librsvg") for SVG previews"ffmpegthumbnailer"for video thumbnails"highlight","bat"or"pygmentize"for syntax highlighting of code"atool","bsdtar","unrar"and/or"7zz"to preview archives"bsdtar","tar","unrar","unzip"and/or"zipinfo"(and"sed") to preview archives as their first image"lynx","w3m"or"elinks"to preview html pages"pdftotext"or"mutool"(and"fmt") for textual pdf previews,"pdftoppm"to preview as image"djvutxt"for textual DjVu previews,"ddjvu"to preview as image"calibre"or"epub-thumbnailer"for image previews of ebooks"transmission-show"for viewing BitTorrent information"mediainfo"or"exiftool"for viewing information about media files"odt2txt"for OpenDocument text files (odt, ods, odp and sxw)"python"or"jq"for JSON files"sqlite3"for listing tables in SQLite database (and optionally"sqlite-utils"for fancier box drawing.)"fontimage"for font previews"openscad"for 3D model previews (stl, off, dxf, scad, csg)"draw.io"for draw.iohttps://app.diagrams.net/diagram previews (drawio extension)
install these programs (just the ones you need) and scope.sh will automatically use them. you don't need all of them, bestie, just the ones that match your files π
independently of the preview script, there is a feature to preview images by drawing them directly into the terminal. to enable this feature, set the option "preview_images" to true and enable one of the image preview modes:
π₯οΈ iTerm2
this only works in iTerm2 compiled with image preview support, but works over ssh. iconic behavior honestly.
to enable this feature, set the option "preview_images_method" to iterm2.
this feature relies on the dimensions of the terminal's font. by default, a width of 8 and height of 11 are used. to use other values, set the options "iterm2_font_width" and "iterm2_font_height" to the desired values.
π sixel
this works in most terminal emulators, including all terminals based on VTE >=0.68 (e.g. GNOME Terminal), iTerm2, MinTTY, WezTerm and many others.
to enable this feature, install "imagemagick" and set the option "preview_images_method" to sixel.
preferred dithering method can be specified by setting "sixel_dithering".
π± kitty
this works in terminals supporting the Kitty graphics protocol. it requires PIL (or pillow) to work. allows remote image previews, for example in an ssh session. yes, ssh AND pictures. she can do both π
to enable this feature, set the option "preview_images_method" to kitty.
πΈ terminology
this only works in terminology. it can render vector graphics, but works only locally.
to enable this feature, set the option "preview_images_method" to terminology.
π¦ ueberzug
Γberzug is a command line utility which draws images on terminals using child windows. it requires PIL (or pillow) and relies on X11. this makes it compatible (in a limited way, i.e., tmux splits are not supported) with many terminals and tmux but not the Linux console or Wayland.
to enable this feature, set the option "preview_images_method" to ueberzug.
π urxvt
this only works in urxvt compiled with pixbuf support. does not work over ssh.
essentially this mode sets an image as a terminal background temporarily, so it will break any previously set image background. so like, heads up, it's messy in a specific way π
to enable this feature, set the option "preview_images_method" to urxvt.
β urxvt-full
the same as urxvt but utilizing not only the preview pane but the whole terminal window.
to enable this feature, set the option "preview_images_method" to urxvt-full.
π w3m
this does not work over ssh, requires certain terminals (tested on "xterm", "urxvt", and "Alacritty") and is compatible with tmux and screen.
to enable this feature, install the program "w3m" and set the option "preview_images_method" to w3m.
part 1 out, more coming, don't go anywhere π§
Okay so if your terminal has a nonzero border and itβs not automatically detected, the w3m preview is gonna be misaligned π. Use the w3m_offset option to manually adjust the image offset β and it should be the same value as the terminalβs border value, bestie. π
π SELECTION π
The selection is literally defined as βAll marked files IF THERE ARE ANY, otherwise the current file.β π«Ά Be aware of this when using the :delete command, because that deletes all files in the selection. Not just the one under your cursor. π
You can mark files by pressing Space, v, etc. A yellow Mrk symbol at the bottom right indicates that there are marked files in this directory. π
β¨ MACROS β¨
Macros can be used in commands to abbreviate things. Iconic little shortcuts, honestly.
%fβ the highlighted file%dβ the path of the current directory%sβ the selected files in the current directory%tβ all tagged files in the current directory%cβ the full paths of the currently copied/cut files%pβ the full paths of selected files
The macros %f, %d, %p, and %s also have upper case variants, %F, %D, %P, and %S, which refer to the next tab. To refer to specific tabs, add a number in between. (%7s = selection of the seventh tab.) π¦
%c is the only macro which ranges out of the current directory. So you may βabuseβ the copying function for other purposes, like diffing two files which are in different directories:
Yank the file A (type yy), move to the file B, then type
@diff %c %f
Macros for file paths are generally shell-escaped so they can be used in the "shell" command.
When mapping keys you can use the placeholder <any>, and the key entered in that position can be used through the %any and %any_path macros. (When using multiple <any> placeholders you can index the macros: %any0, %any_path0, %any1, %any_path1...) The macro %any will be replaced with the key pressed in the position of the <any> placeholder. The macro %any_path will be replaced with the path of the bookmark mapped to the key pressed in the position of the <any> placeholder. For example this macro can be used to echo the key that was pressed after "c":
map c<any> echo %any
%any is used in the ranger configuration to create a keybinding for adding a bookmark. c<set_bookmark> creates a bookmark for the current directory and the key for the bookmark is the first supplied argument. In this case the key pressed after "m":
map m<any> set_bookmark %any
The %any_path macro can be used to echo the path of the bookmark that is set to the key pressed after "c":
map c<any> echo %any_path
A practical example of the use of %any_path is the pasting of cut/copied files to a bookmarked directory:
map p'<any> paste dest=%any_path
The macro %rangerdir expands to the directory of rangerβs python library, you can use it for something like this command:
alias show_commands shell less %rangerdir/config/commands.py
%confdir expands to the directory given by --confdir.
%datadir expands to the directory given by --datadir.
The macro %space expands to a space character. You can use it to add spaces to the end of a command when needed, while preventing editors to strip spaces off the end of the line automatically. π
To write a literal %, you need to escape it by writing %%.
Note that macros are expanded twice when using chain. For example, to insert a space character in a chained command, you would write %%space:
chain command1; command2%%space
π BOOKMARKS π
Type m<key> to bookmark the current directory. You can re-enter this directory by typing </kbd> followed by your <key>. <key>` can be any letter or digit. Unlike vim, both lowercase and uppercase bookmarks are persistent. β¨
Each time you jump to a bookmark, the special bookmark at key </kbd> will be set to the last directory. So typing <kbd>` gets you back to where you were before. π
Bookmarks are selectable when tabbing in the :cd command.
Note: The bookmarks ' (Apostrophe) and ` (Backtick) are the same. π
π« RIFLE π«
Rifle is the file opener of ranger. It can be used as a standalone program or a python module. It is located at $repo/ranger/ext/rifle.py. In contrast to other, more simple file openers, rifle can automatically find installed programs so it can be used effectively out of the box on a variety of systems. π₯
Itβs configured in rifle.conf through a list of conditions and commands. For each line the conditions are checked and if they are met, the respective command is taken into consideration. By default, simply the first matching rule is used. In ranger, you can list and choose rules by typing r or simply by typing "<rulenumber><enter>". If you use rifle standalone, you can list all rules with the -l option and pick a rule with -p <number>.
The rules, along with further documentation, are contained in $repo/ranger/config/rifle.conf.
π FLAGS π
Flags give you a way to modify the behavior of the spawned process. They are used in the commands :open_with (key r) and :shell (key !).
fβ Fork the process, i.e. run in background. Please use this flag instead of callingdisownornohup, to avoid killing the background command when pressing Ctrl+C in ranger.cβ Run the current file only, instead of the selectionrβ Run application with root privilege (requires sudo)tβ Run application in a new terminal window
There are some additional flags that can currently be used only in the "shell" command: (for example :shell -w df)
pβ Redirect output to the pagersβ Silent mode. Output will be discarded.wβ Wait for an Enter-press when the process is done
By default, all the flags are off unless otherwise specified in rc.conf key bindings or rifle.conf rules. You can specify as many flags as you want. An uppercase flag negates the effect: ffcccFsf is equivalent to cs.
The terminal program name for the "t" flag is taken from the environment variable $TERMCMD. If it doesnβt exist, it tries to extract it from $TERM, uses "x-terminal-emulator" as a fallback, and then "xterm" if that fails.
Examples: :open_with c will open the file that you currently point at, even if you have selected other files. :shell -w df will run df and wait for you to press Enter before switching back to ranger. π
π§ PLUGINS π§
rangerβs plugin system consists of python files which are located in ~/.config/ranger/plugins/ and are imported in alphabetical order when starting ranger. A plugin changes rangerβs behavior by overwriting or extending a function that ranger uses. This allows you to change pretty much every part of ranger, but there is no guarantee that things will continue to work in future versions as the source code evolves. π
Adding new commands via a plugin is as simple as specifying them like you would do in the commands.py.
There are some hooks that are specifically made for the use in plugins. They are functions that start with hook_ and can be found throughout the code. πͺ
grep 'def hook_' -r /path/to/rangers/source
Also try:
pydoc ranger.api
Note that you should NOT simply overwrite a function unless you know what youβre doing. Instead, save the existing function and call it from your new one. This way, multiple plugins can use the same hook. There are several sample plugins in the /usr/share/doc/ranger/examples/ directory, including a hello-world plugin that describes this procedure. πΈ
β¨ KEY BINDINGS β¨
So all the key bindings live in the file %rangerdir/config/rc.conf β that's literally the whole list, bestie, go look at it. If you want your own copy in your local config directory, just run --copy-config=rc and it's yours to edit π
And here's the cute part: loooots of key bindings take a numeric argument. Like, you can type 5j and you move down 5 lines. Type 2l and you open a file in mode 2. Type 10<Space> and boom, 10 files marked. It's giving vim energy, iykyk π
This next list is the most useful ones β not all of them, so don't come for me.
π MAIN BINDINGS π
h,j,k,lβ Move left, down, up or right. The holy quartet, periodt.^DorJ,^UorKβ Move a half page down, up.H,Lβ Move back and forward in the history. Time travel, lowkey.ggβ Move to the top.Gβ Move to the bottom.[,]β Move up and down in the parent directory.^Rβ Reload everything. The "have you tried turning it off and on again" of ranger β¨Fβ Toggle thefreeze_filessetting. When it's active (you'll see a cyanFROZENmessage in the status bar, iconic), directories and files will not be loaded β which is a huge performance glow-up when all the files you need are already loaded. Heads up tho: this does not affect file previews, those get toggled withzp. Also try disabling the preview of directories withzPif you're feeling extra.^Lβ Redraw the screen. A little refresh, a little self-care πiβ Inspect the current file in a bigger window. Main character energy for whatever file you're looking at.Eβ Edit the current file in$VISUAL, otherwise$EDITOR, otherwise"vim".Sβ Open a shell in the current directory.?β Opens this man page. Hi, that's me, you're reading me π«ΆWβ Opens the log window, where you can review messages that pop up at the bottom.wβ Opens the task window, where you can view and modify background processes that currently run inranger. In there, you can type"dd"to abort a process and"J"or"K"to change the priority of a process. Just so you know: only one process is run at a time.^Cβ Stop the currently running background process that ranger has started β like copying files, loading directories or file previews.<octal>=,+<who><what>,-<who><what>β Change the permissions of the selection. For example,"777="is equivalent to"chmod 777 %s","+ar"does"chmod a+r %s","-ow"does"chmod o-w %s"etc. Perms queen πyyβ Copy (yank) the selection, like pressing Ctrl+C in modern GUI programs. (You can also type"ya"to add files to the copy buffer,"yr"to remove files again, or"yt"for toggling.)ddβ Cut the selection, like pressing Ctrl+X in modern GUI programs. (There are also"da","dr"and"dt"shortcuts equivalent to"ya","yr"and"yt".)ppβ Paste the files which were previously copied or cut, like pressing Ctrl+V in modern GUI programs.
Conflicts will be renamed by appending an '_' (and a counter if necessary), resulting in "file.ext_", "file.ext_0", etc. If you prefer "file_.ext" you can use the "paste_ext" command. So considerate, honestly π
poβ Paste the copied/cut files, overwriting existing files. Bold. Dangerous. No undo, bestie πpP,pOβ Likeppandpo, but queues the operation so that it will be executed after any other operations. Reminder: type"w"to open the task window.pl,pLβ Create symlinks (absolute or relative) to the copied files.phlβ Create hardlinks to the copied files.phtβ Duplicate the subdirectory tree of the copied directory, then create hardlinks for each contained file into the new directory tree.mXβ Create a bookmark with the nameX.`Xβ Move to the bookmark with the nameX.nβ Find the next file. By default, this gets you to the newest file in the directory, but if you search something using the keys/,cm,ct,..., it will get you to the next found entry.Nβ Find the previous file.oXβ Change the sort method (like in mutt).zXβ Change settings. See the settings section for a list of settings and their hotkey.u?β Universal undo-key. Depending on the key that you press after"u", it either restores closed tabs (uq), removes tags (ut), clears the copy/cut buffer (ud), starts the reversed visual mode (uV) or clears the selection (uv). One key, five personality traits πfβ Quickly navigate by entering a part of the filename.Spaceβ Mark a file.vβ Toggle the mark-status of all files.Vβ Starts the visual mode, which selects all files between the starting point and the cursor until you press ESC. To unselect files in the same way, use"uV"./β Search for files in the current directory.:β Open the console.!β Open the console with the content"shell "so you can quickly run commands.@β Open the console with the content"shell %s", placing the cursor before the" %s"so you can quickly run commands with the current selection as the argument.rβ Open the console with the content"open with "so you can decide which program to use to open the current file selection.cdβ Open the console with the content"cd ".^Pβ Open the console with the most recent command. Muscle memory slay.Alt-Nβ Open a tab.Nhas to be a number from0to9. If the tab doesn't exist yet, it will be created. Manifesting tabs into existence β¨Alt-l,Alt-rβ Shift a tab left, respectively right.gn,^Nβ Create a new tab.gt,gTβ Go to the next or previous tab. You can also use TAB and SHIFT+TAB instead.gc,^Wβ Close the current tab. The last tab cannot be closed this way β sorry, you gotta keep at least one alive π~β Toggle between viewmodes. Seeviewmodein the SETTINGS section.Mβ A key chain that allows you to quickly change the line mode of all the files of the current directory. For a more permanent solution, use the command"default_linemode"in yourrc.conf..dβ Apply the typefilter"directory"..fβ Apply the typefilter"file"..lβ Apply the typefilter"symlink"..mβ Apply a new mimetype filter..nβ Apply a new filename filter..#β Apply a new hash filter.."β Apply a new duplicate filter..'β Apply a new unique filter..|β Combine the two topmost filters from the filter stack in the"OR"relationship, instead of the"AND"used implicitly..&β Explicitly combine the two topmost filters in the"AND"relationship. Usually not needed because filters are implicitly in this relationship though might be useful in more complicated scenarios..!β Negate the topmost filter..rβ Rotate the filter stack byNelements. WhereNis provided as a numeric prefix like vim's count and defaults to1, i.e. move the topmost element to the bottom of the stack..cβ Clear the filter stack..*β Decompose the topmost filter combinator (e.g.".!",".|")..pβ Pop the topmost filter from the filter stack...β Show the current filter stack state.
πΈ READLINE-LIKE BINDINGS IN THE CONSOLE πΈ
Yeah, the console gets its own little emacs-flavoured moment π
^B,^Fβ Move left and right (Bfor back,Ffor forward).^P,^Nβ Move up and down (Pfor previous,Nfor Next).^A,^Eβ Move to the start or to the end.Alt-B,Alt-LEFTβ Move backwards by words.Alt-F,Alt-RIGHTβ Move forwards by words.^Dβ Delete the current character.^Hβ Backspace.
π±οΈ MOUSE BUTTONS π±οΈ
Yes bestie, you can click. Go off.
Left Mouse Button
Click on something and you'll move there. That's it. That's the whole vibe π«Ά
Right Mouse Button
Enter a directory or run a file. To run a file you can either right click the file in the main column or right click on the preview. Two ways to do the same thing, we love options β¨
Scroll Wheel
Scrolls up or down. Cute trick: you can point at the column of the parent directory while scrolling to switch directories. Sneaky. Iconic. π
π SETTINGS π
This section lists all the built-in settings of ranger. The valid types for the value are in [brackets]. The hotkey to toggle the setting is in <brackets>, if a hotkey exists.
Settings can be changed in the file ~/.config/ranger/rc.conf or on the fly with the command :set option value. Examples:
set column_ratios 1,2,3
set show_hidden true
Toggling options can be done with:
set show_hidden!
The different types of settings and an example for each type:
boolβ example values:true,falseintegerβ example values:1,23,1337stringβ example values:foo,hello worldlistβ example values:1,2,3,4noneβ example values:none
You can view a list of all settings and their current values by pressing "3?" in ranger. Do it, it's so satisfying π
automatically_count_files[bool]β Should ranger count and display the number of files in each directory as soon as it's visible? Ngl this gets slow with remote file systems. Turning it off will still allow you to see the number of files after entering the directory, so no stress πautosave_bookmarks[bool]β Save bookmarks (used withmXand`X) instantly? This helps to synchronize bookmarks between multiple ranger instances but leads to slight performance loss. Whenfalse, bookmarks are saved when ranger is exited.autoupdate_cumulative_size[bool]β You can display the"real"cumulative size of directories by using the command:get_cumulative_sizeor typing"dc". The size is expensive to calculate and will not be updated automatically. You can choose to update it automatically though by turning on this option. Fancy but it costs you πcd_bookmarks[bool]β Specify whether bookmarks should be included in the tab completion of the"cd"command.cd_tab_case[string]β Changes case sensitivity for the"cd"command tab completion. Possible values are:sensitiveinsensitivesmart
cd_tab_fuzzy[bool]β Use fuzzy tab completion with the"cd"command. For example,:cd /u/lo/b<TAB>expands to:cd /usr/local/bin. Witchcraft. Obsessed.clear_filters_on_dir_change[bool]β If set to'true', persistent filters would be cleared upon leaving the directory.collapse_preview[bool]<zc>β When no preview is visible, should the last column be squeezed to make use of the whitespace?colorscheme[string] β which colorscheme are we vibing with today? π the ones that ship by default aredefault,jungle, andsnow.snowis the monochrome one (very clean, very minimal), andjungleswaps the blue directories out for green ones so they actually pop on certain terminals. pick your aesthetic.column_ratios[list] β how many columns do you want, and how wide is each one relative to the others? π like,1,1,1= three evenly sized columns. and1,1,1,1,4= five columns where the preview column is as big as all the other columns combined. math but make it fashion.confirm_on_delete[string] β should ranger ask "bestie are you sure" before running thedeletecommand? valid values are"always","never", and"multiple"(that's the default). with"multiple", ranger only double-checks if you're deleting multiple files at once.confirm_on_trash[string] β same question but for thetrashcommand? valid values are"always","never","multiple", and"like_delete"(default). with"like_delete", ranger just honors whatever you set inconfirm_on_deleteinstead. iykyk.dirname_in_tabs[bool] β show the directory name in the tabs? β¨display_size_in_main_column[bool] β show file sizes in the main column? πdisplay_size_in_status_bar[bool] β show file sizes down in the status bar?display_free_space_in_status_bar[bool] β show free disk space in the status bar? (yes, the "am i about to run out of room" vibe check π«Ά)display_tags_in_all_columns[bool] β show tags in every column?draw_borders[string] β draw borders around or between the columns? the options are giving:
none no borders of any sort
outline draw an outline around all the columns
separators draw only vertical lines between columns
both both of the above
draw_borders_multipane[string] β draw borders around or between the panes. this setting overridesdraw_bordersspecifically for the multipane viewmode, in case you want different border styles in each viewmode. there's one extra legal value on top of all thedraw_bordersones:
active-pane draw an outline around the active pane only
draw_progress_bar_in_status_bar[bool] β draw a progress bar in the status bar showing the average state of all currently running tasks that support progress bars? π₯ very satisfying to watch ngl.filter_dead_tabs_on_startup[bool] β remove tabs with unavailable paths on startup? setting this tofalse(which is the default) keeps all saved tabs, even if their path is no longer reachable. lowkey useful when you've got tabs pointing at removable media or network volumes. πΎflushinput[bool]<zI>β flush the input after each key hit? one advantage: when you're scrolling down withj, ranger stops scrolling instantly the moment you release the key. one disadvantage: if you type commands blindly, some keys might get lost. πfreeze_files[bool]<F>β when active, directories and files won't be loaded, which boosts performance when all the files you need are already loaded. this does not affect file previews.global_inode_type_filter[string] β likefilter_inode_type, but globally for all directories. super useful in combination with--choosedir:
ranger --choosedir=/tmp/x --cmd='set global_inode_type_filter d'
hidden_filter[string] β a regular expression pattern for files that should be hidden. for example, this pattern hides all files that start with a dot or end with a tilde:
set hidden_filter ^\.|~$
hint_collapse_threshold[int] β key hint lists up to this size get their sublists expanded. anything bigger has its submaps replaced with.... (keeps the hints from becoming an essay π)hostname_in_titlebar[bool] β show the hostname in the titlebar?size_in_bytes[bool] β print file sizes in bytes instead of the default human-readable format.binary_size_prefix[bool] β show large file sizes with binary unit prefixes βkibibytes=Ki,mebibytes=Mietc. β instead of the default decimal prefixes βkilobytes=k,megabytes=Metc. each binary unit prefix means1024=2^10of the preceding unit prefix (there are1024 KiBin1 MiB), as opposed to decimal unit prefixes, which mean a1000of the preceding unit prefix (there are1000 kBin1 MB). nerd moment but it's correct β¨idle_delay[integer] β the delay that ranger idly waits for user input, in milliseconds, with a resolution of100ms. a lower delay reduces lag between directory updates but increases CPU load. tradeoffs, bestie π«iterm2_font_height[integer] β change the assumed font height in iTerm2, which may help with iTerm image previews.iterm2_font_width[integer] β change the assumed font width in iTerm2, which may help with iTerm image previews.line_numbers[string] β show line numbers in the main column? possible values:
false turn the feature off
absolute absolute line numbers for use with "<N>gg"
relative relative line numbers for "<N>k" or "<N>j"
max_console_history_size[integer, none] β how many console commands should be kept in history?"none"disables the limit. πmax_history_size[integer, none] β how many directory changes should be kept in history?metadata_deep_search[bool] β when the metadata manager module looks for metadata, should it only look for a.metadata.jsonfile in the current directory, or do a deep search and check all the directories above the current one as well? πmouse_enabled[bool]<zm>β enable mouse input? π±οΈnested_ranger_warning[string] β warn at startup ifRANGER_LEVELis greater than0β in other words, warn you when you nest ranger in a subshell started by ranger. allowed values are"true","false", and"error". the special value"error"promotes the warning to an actual error; this is usually shown as red text, but it will crash ranger when run with the--debugflag. π proceed accordingly.one_indexed[bool] β start line numbers from 1? possible values:
false start line numbers from 0
true start line numbers from 1
open_all_images[bool] β open all images in this directory when running certain image viewers likefehorsxiv? you can still open selected files by marking them. if there would be too many files for the system to handle, this option gets temporarily disabled automatically. π safety first.padding_right[bool] β whencollapse_previewis on and there's no preview, should a little padding remain on the right? this lets you right click into that space to run the file. clever lil feature fr.preview_directories[bool]<zP>β preview directories in the preview column? πΈpreview_files[bool]<zp>β preview files in the preview column?preview_images[bool]<zi>β draw images inside the console with the external programw3mimgpreview? πΌοΈpreview_images_method[string] β set the preview image method. supported methods:w3m,iterm2,urxvt,urxvt-full,terminology. see the PREVIEWS section. πpreview_max_size[int] β avoid previewing files that exceed a certain size, in bytes. use a value of0to disable this feature. (protects you from trying to preview a 40GB file lmaooo)preview_script[string, none] β which script should handle generating previews? if the file doesn't exist, oruse_preview_scriptis off, ranger handles previews itself by just printing the content. simple as that πrelative_current_zero[bool] β whenline_numbersis set to relative, show0on the current line iftrue, or show the absolute number of the current line whenfalse.save_backtick_bookmark[bool] β save the`bookmark to disk? this bookmark is what you use to switch to the last directory by typing``. πsave_console_history[bool] β should the console history be saved on exit? if disabled, the console history gets reset when you restart ranger.save_tabs_on_exit[bool] β save all tabs, except the active one, on exit? the last saved tabs are restored once when starting the next session. multiple sessions are stored in a stack, and the oldest saved tabs are restored first. ποΈscroll_offset[integer] β try to keep this much space between the top/bottom border when scrolling. (breathing room, bestie β¨)shorten_title[integer] β trim the window title if it gets long? the number defines how many directories are displayed at once. a value of0turns this feature off.show_cursor[bool] β always show the terminal cursor? πshow_hidden_bookmarks[bool] β show dotfiles in the bookmark preview window? (type'to get there)show_hidden[bool]<zh>,<^H>β show hidden files? πshow_selection_in_titlebar[bool] β add the highlighted file to the path in the titlebar.sort_case_insensitive[bool]<zc>β sort case-insensitively? iftrue,"a"gets listed before"B"even though its ASCII value is higher. πsort_directories_first[bool]<zd>β sort directories first? πsort_reverse[bool]<or>β reverse the order of files?sort_unicode[bool] β when sorting according to some string, should unicode characters be compared, instead of looking at the raw character values to save time? πsort[string]<oa>,<ob>,<oc>,<oe>,<om>,<on>,<ot>,<os>,<oz>β which sorting mechanism should be used? choose one ofatime,basename,ctime,extension,mtime,natural,type,size,random.
note: you can reverse the order by typing an uppercase second letter in the key combination, e.g. "oN" to sort from Z to A. π₯
status_bar_on_top[bool] β put the status bar at the top of the window?tilde_in_titlebar[bool] β abbreviate$HOMEwith~in the titlebar (first line) of ranger? πunicode_ellipsis[bool] β use a unicode"..."character instead of"~"to mark cut-off filenames? β¨bidi_support[bool] β try to properly display file names in RTL languages (Hebrew, Arabic) by using a BIDI algorithm to reverse the relevant parts of the text. requires thepython-bidipip package. π§update_title[bool] β set a window title? updates both theWM_NAMEandWM_ICON_NAMEproperties.update_tmux_title[bool] β set the tmux/screen window-name to"ranger"? π«Άuse_preview_script[bool]<zv>β use the preview script defined in thepreview_scriptsetting?vcs_aware[bool] β gather and display data about version control systems. supported vcs:git,hg. πvcs_backend_git,vcs_backend_hg,vcs_backend_bzr,vcs_backend_svn[string] β sets the state for the version control backend. possible values:
disabled Don't display any information.
local Display only local state.
enabled Display both, local and remote state.
May be slow for hg and bzr.
heads up:enabledmay be slow forhgandbzr, so don't come for me when it lags π
vcs_msg_length[int] β how many characters of the first line of a commit message you get before it gets chopped when it's chilling in the statusbar. Defaults to50. Short and sweet, bestie.viewmode[string] β sets the view mode, and it's giving two flavors:millershows files in the classic miller column view (multiple levels of the hierarchy, all lined up, v aesthetic) ormultipanewhich uses multiple panes β one per tab β similar to midnight-commander. Choose your fighter β¨w3m_delay[float] β the delay in seconds before an image gets displayed with thew3mmethod. Bump it up if you're experiencing display corruption, no cap.w3m_offset[int] β offset in pixels for the inner border of the terminal. Some terminals require the offset to be specified explicitly β among othersstandUXtermβ and some don't likeurxvt. π Terminals are so dramatic honestly.sixel_dithering[string] β one of the dithering methods supported byconvert, used for SIXEL image previews.
convert currently supports the following dithering methods:
Noneβ no ditheringRiemersmaβ dithering along a Hilbert curve with restricted error proliferationFloydSteinbergβ error diffusion dithering
wrap_plaintext_previews[bool] β whether or not to wrap long lines in the pager. This includes previews of plain text files, fyi.wrap_scroll[bool] β enables scroll wrapping π β moving down while on the last item wraps around to the top, and vice versa. Iconic circular behavior.xterm_alt_key[bool] β turn this on if key combinations with the Alt key just don't work for you. (Especially onxterm.) She's picky like that π
π COMMANDS π
okay so you can enter commands in the console, which opens when you press :. main character moment.
You can always get a list of the currently existing commands by typing ?c in ranger. And for your convenience, here's the list of the "public" commands including their parameters, excluding descriptions β look at all these queens:
alias [newcommand] [oldcommand]
bulkrename
cd [path]
chain command1[; command2[; command3...]]
chmod octal_number
cmap key command
console [-pSTARTPOSITION | -s SENTINEL] command
copycmap key newkey [newkey2...]
copymap key newkey [newkey2...]
copypmap key newkey [newkey2...]
copytmap key newkey [newkey2...]
cunmap keys...
default_linemode [path=regexp | tag=tags] linemodename
delete
echo [text]
edit [filename]
eval [-q] python_code
filter [string]
filter_inode_type [dfl]
find pattern
flat level
grep pattern
help
jump_non [-FLAGS...]
linemode linemodename
load_copy_buffer
map key command
mark pattern
mark_tag [tags]
meta key value
mkdir dirname
open_with [application] [flags] [mode]
pmap key command
prompt_metadata [key1 [key2 [...]]]
punmap keys...
quit
quit!
quitall
quitall!
relink newpath
rename_append [-FLAGS...]
rename newname
save_copy_buffer
scout [-FLAGS...] pattern
search pattern
search_inc pattern
set option value
setinpath [path=<path>] option value
setinregex [re=<regex>] option value
setintag tags option value
setlocal [path=<path>] option value
shell [-FLAGS...] command
source filename
terminal
tmap key command
touch filename
trash
travel pattern
tunmap keys...
unmap keys...
unmark pattern
unmark_tag [tags]
There are additional commands which are directly translated to python functions β one for every method in the ranger.core.actions.Actions class. They are not documented here, because they're mostly for key bindings and not for you to type in by hand. Read the source if you're interested in them π iykyk.
And these are the public commands including their descriptions β grab a snack, this is a long one:
alias [newcommand] [oldcommand]β copies theoldcommandasnewcommand. Basically a glow-up for a command β¨bulkrenameβ this command opens a list of selected files in an external editor. After you edit and save the file, it will generate a shell script which does bulk renaming according to the changes you did in the file.
This shell script is opened in an editor for you to review. After you close it, it will be executed. So like, you get a vibe check before anything happens π
cd [path]β thecdcommand changes the directory. If path is a file, it selects that file. The command:cd -is equivalent to typing ``. (yes, the original really renders exactly like that, two lonely backticks β not me questioning the manpage π)chain command1[; command2[; command3...]]β combines multiple commands into one, separated by semicolons. Combo move.chmod octal_numberβ sets the permissions of the selection to the octal number.
The octal number is between 000 and 777. The digits specify the permissions for the user, the group and others. A 1 permits execution, a 2 permits writing, a 4 permits reading. Add those numbers to combine them. So a 7 permits everything. She ate and left no crumbs π
Key bindings in the form of [-+]<who><what> and <octal>= also exist. For example, +ar allows reading for everyone, -ow forbids others to write and 777= allows everything.
See also: man 1 chmod
console [-pN | -s sentinel] commandβ opens the console with the command already typed in. The cursor is placed at N or at the first occurrence of sentinel. Note that sentinel strings can potentially occur inside macro expansions. If you cannot provide a sentinel which is guaranteed to be unique, you should use-p. fr fr, just use-p.copymap key newkey [newkey2 ...]copycmap key newkey [newkey2 ...]copypmap key newkey [newkey2 ...]copytmap key newkey [newkey2 ...]
Copies the keybinding key to newkey in the "browser" context. This is a deep copy, so if you change the new binding (or parts of it) later, the old one is not modified. For example, copymap j down will make the key sequence "down" move the cursor down one item.
To copy key bindings of the console, pager or taskview use copycmap, copypmap or copytmap respectively. Pick the right one bestie π«Ά
default_linemode [path=regexp | tag=tags] linemodenameβ sets the default linemode. Seelinemodecommand.
Examples:
Set the global default linemode to "permissions":
:default_linemode permissions
Set the default linemode to "permissions" for all files tagged with "p" or "P":
:default_linemode tag=pP permissions
Set the default linemode for all files in ~/books/ to "metatitle":
:default_linemode path=/home/.*?/books/.* metatitle
deleteβ destroy all files in the selection with a roundhouse kick π₯ ranger will ask for a confirmation if you attempt to delete multiple (marked) files or non-empty directories. This can be changed by modifying the settingconfirm_on_delete. Careful with this one, it's giving danger.echo textβ display the text in the statusbar. Little message to yourself πedit [filename]β edit the current file or the file in the argument.eval [-q] python_codeβ evaluates the python code.fmis a reference to the FM instance. To display text, use the functionp. The result is displayed on the screen unless you use the-qoption.
Examples:
:eval fm
:eval len(fm.tabs)
:eval p("Hello World!")
filter [string]β displays only the files which contain the string in their basename. Running this command without any parameter will reset the filter.
This command is based on the scout command and supports all of its options.
filter_inode_type [dfl]β displays only the files of specified inode type. To display only directories, use thedparameter. To display only files, use thefparameter. To display only links, use thelparameter. Parameters can be combined. To remove this filter, use no parameter. Mix and match, it's a whole aesthetic πfilter_stack [command [args]]β manage the filter stack, adding, removing and manipulating filters. For example, to show only duplicate files and symlinks:
:filter_stack add type f
:filter_stack add duplicate
:filter_stack add and
:filter_stack add type l
:filter_stack add or
Or using the mapped keys:
.f ." .& .l .|
Available subcommands:
add FILTER_TYPE [ARGS...]β add a new filter to the top of the filter stack. Each filter on the stack is applied in turn, resulting in an implicit logical "AND" relation. The following "FILTER_TYPE"s are available:duplicateβ filter files so only files that have duplicates in the same directory are shown. Useful when cleaning up identical songs and memes that were saved using distinct file names π we've all been there.name NAMEβ filter files that contain NAME in the filename, regular expression syntax is allowed.hash PATHβ filter files so only files with the same hash as PATH are shown.mimetype TYPEβ filter files of a certain MIME type, regular expression syntax is allowed.typefilter [d|f|l]β filter files of a certain type, "d" for directories, "f" for files and "l" for symlinks.uniqueβ filter files so only unique files and the oldest file of every set of duplicates is shown.andβ explicitly combine the two topmost filters in the "AND" relationship. Usually not needed because filters are implicitly in this relationship though might be useful in more complicated scenarios.notβ negate the topmost filter.orβ combine the two topmost filters from the filter stack in the "OR" relationship, instead of the "AND" used implicitly.
popβ pop the topmost filter from the filter stack.decomposeβ decompose the topmost filter combinator (e.g..!,.|).rotate [N=1]β rotate the filter stack by N elements. Where N is passed as argument or as a numeric prefix like vim's count, default to1β i.e. move the topmost element to the bottom of the stack.clearβ clear the filter stack.showβ show the current filter stack state.
find patternβ search files in the current directory that contain the given (case-insensitive) string in their name as you type. Once there is an unambiguous result, it will be run immediately. (Or entered, if it's a directory.) Live search realness β¨
This command is based on the scout command and supports all of its options.
flat levelβ flattens the directory view up to the specified level. Level-1means infinite level. Level0means standard view without flattened directory view. Level values-2and less are invalid. Don't go there πgrep patternβ looks for a string in all marked files or directories.helpβ provides a quick way to view ranger documentations. The answer is right there bestie πjump_non [-flags...]β jumps to first non-directory if highlighted file is a directory and vice versa.
Flags:
-rβ jump in reverse order-wβ wrap around if reaching end of filelist
linemode linemodename β okay so this one sets the linemode for every file in the current directory, bestie. The linemode can be:
"filename"β display each line as"<basename>...<size>""fileinfo"β display each line as"<basename>...<file(1) output>""mtime"β display each line as"<basename>...<mtime>"in ISO format"humanreadablemtime"β display each line as"<basename>...<mtime>"in a human readable format, more precise the more recent."sizemtime"β display each line as"<basename>...<size> <mtime>"in ISO format"sizehumanreadablemtime"β display each line as"<basename>...<size> <mtime>"in a human readable format, more precise the more recent."permissions"β display each line as"<permissions> <owner> <group> <basename>""metatitle"β display metadata from.metadata.jsonfiles if available, fall back to the"filename"linemode if no metadata was found. See:metacommand.
The custom linemodes may be added by subclassing the LinemodeBase class. See the ranger.core.linemode module for some examples. iykyk β¨
load_copy_buffer β loads the copy buffer from ~/.config/ranger/copy_buffer. This can be used to pass the list of copied files to another ranger instance. literally passing the aux cord between ranger sessions π«Ά
mapkeycommandcmapkeycommandpmapkeycommandtmapkeycommand
Assign the key combination to the given command. Whenever you type the key/keys, the command will be executed. Additionally, if you use a quantifier when typing the key, like 5j, it will be passed to the command as the attribute "self.quantifier".
The keys you bind with this command are accessible in the file browser only, not in the console, pager or taskview. To bind keys there, use the commands "cmap", "pmap" or "tmap". π
mark pattern β mark all files matching the regular expression pattern.
This command is based on the scout command and supports all of its options. scout girlies stay winning πΈ
mark_tag [tags] β mark all tags that are tagged with either of the given tags. When leaving out the tag argument, all tagged files are marked. π
meta key value β set the metadata of the currently highlighted file. Example:
:meta title The Hitchhiker's Guide to the Galaxy
:meta year 1979
This metadata can be displayed by, for example, using the "metatitle" line mode by typing Mt. iconic little metadata moment β
mkdir dirname β creates a directory with the name dirname. new folder just dropped π¦
open_with [application] [flags] [mode] β open the selected files with the given application, unless it is omitted, in which case the default application is used. flags change the way the application is executed and are described in their own section in this man page. The mode is a number that specifies which application to use. The list of applications is generated by the external file opener "rifle" and can be displayed when pressing "r" in ranger.
Note that if you specify an application, the mode is ignored. no cap, mode gets ghosted π
prompt_metadata [keys ...] β prompt the user to input metadata with the "meta" command for multiple keys in a row. π
quit β closes the current tab, if thereβs only one tab. Otherwise quits if there are no tasks in progress. The current directory will be bookmarked as ' so you can re-enter it by typing this little combo the next time you start ranger:
`` or ''
bookmark main character energy π
quit! β like "quit", except will force quit even if tasks are in progress. force quit is giving chaos, use responsibly π
quitall β like "quit", except will quit even if multiple tabs are open.
quitall! β like "quitall", except will force quit even if tasks are in progress.
relink newpath β change the link destination of the current symlink file to <newpath>. First Tab will load the original link. symlink glow-up fr fr π₯
rename newname β rename the current file. If a file with that name already exists, the renaming will fail. Also try the key binding A for appending something to a file name. π¦
rename_append [-flags...] β opens the console with ":rename <current file>" with the cursor positioned before the file extension.
Flags:
-aβ Position before all extensions-rβ Remove everything before extensions
save_copy_buffer β save the copy buffer to ~/.config/ranger/copy_buffer. This can be used to pass the list of copied files to another ranger instance. copy buffer said βsave meβ and ranger listened β¨
scout [-flags...] [--] pattern β Swiss army knife command for searching, traveling and filtering files.
Flags:
-aβ Automatically open a file on unambiguous match-eβ Open the selected file when pressing enter-fβ Filter files that match the current search pattern-gβ Interpret pattern as a glob pattern-iβ Ignore the letter case of the files-kβ Keep the console open when changing a directory with the command-lβ Letter skipping; e.g. allow"rdme"to match the file"readme"-mβ Mark the matching files after pressing enter-Mβ Unmark the matching files after pressing enter-pβ Permanent filter: hide non-matching files after pressing enter-rβ Interpret pattern as a regular expression pattern-sβ Smart case; like-iunless pattern contains upper case letters-tβ Apply filter and search pattern as you type-vβ Inverts the match
Multiple flags can be combined. For example, ":scout -gpt" would create a :filter-like command using globbing. combo flags ate π
search pattern β search files in the current directory that match the given (case insensitive) regular expression pattern.
This command is based on the scout command and supports all of its options.
search_inc pattern β search files in the current directory that match the given (case insensitive) regular expression pattern. This command gets you to matching files as you type. live search is that girl π
This command is based on the scout command and supports all of its options.
set option value β assigns a new value to an option. Valid options are listed in the settings section. Use tab completion to get the current value of an option, though this doesnβt work for functions and regular expressions. Valid values are:
boolβtrue,falseintegerβ1,23,1337stringβfoo,hello worldlistβ1,2,3,4noneβnone
setinpath [path=path] option value β assigns a new value to an option, but locally for the directory given by path. This means that this option only takes effect when visiting that directory. If no path is given, uses the current directory.
path can be quoted with either single or double quotes to prevent unwanted splitting, path='~/dl dl' or path="~/dl dl". You can use "pattern" rather than "path" for consistency with "setinregex". quote your paths, bestie π
setinregex [re=regex] option value β assigns a new value to an option, but locally for directories matching regex. This means that this option only takes effect when visiting such directories. If no regular expression is given, uses the current directory.
regex is a regular expression. This means that "re=~/dl" applies to all paths that start with ~/dl, e.g. ~/dl2 and ~/dl/foo. To avoid this, use "path=~/dl$". To specify a folder with special characters (.^$\*+?(){}[]|), escape them with a backslash.
regex can be quoted with either single or double quotes to prevent unwanted splitting,. re='~/dl dl$' or re="~/dl dl$". You can use "regex" rather than "re" to avoid having to remember the spelling and you can use "pattern" for consistency with "setinpath". regex girlies, this oneβs for you π§
setintag tags option value β assigns a new value to an option, but locally for the directories that are marked with tag. This means that this option only takes effect when visiting that directory.
For example, to change the sorting order in your downloads directory, tag it with the v tag by typing "v, then use this command:
setintag v sort ctime
setlocal [path=path] option value β alias for "setinpath". short and sweet π
shell [-flags] command β run a shell command. flags are discussed in their own section. π¦
source filename β reads commands from a file and executes them in the ranger console.
This can be used to re-evaluate the rc.conf file after changing it:
map X chain shell vim -p %confdir/rc.conf %rangerdir/config/rc.conf; \
source %confdir/rc.conf
scroll_preview value β scroll the file preview by value lines. preview said scoot scoot β¨
terminal β spawns the x-terminal-emulator starting in the current directory. π
touch filename β creates an empty file with the name filename, unless it already exists. tiny file, big main character energy π±
trash β move all files in the selection to the trash using rifle. Rifle tries to use a trash manager like trash-cli if available but will fall back to moving files to either $XDG_DATA_HOME/ranger/trash or ~/.local/share/ranger/trash. This is a less permanent version of delete, relying on the user to clear out the trash whenever itβs convenient. While having the possibility of restoring trashed files until this happens. ranger will ask for a confirmation if you attempt to trash multiple (marked) files or non-empty directories. This can be changed by modifying the setting "confirm_on_delete". itβs giving βless permanent delete,β not βno consequences deleteβ π
travel pattern β filters the current directory for files containing the letters in the string, possibly with other letters in between. The filter is applied as you type. When only one directory is left, it is entered and the console is automatically reopened, allowing for fast travel. To close the console, press ESC or execute a file.
This command is based on the scout command and supports all of its options. fast travel unlocked π¦
unmap[keys ...]cunmap[keys ...]punmap[keys ...]tunmap[keys ...]
Removes the given key mappings in the "browser" context. To unmap key bindings in the console, pager, or taskview use "cunmap", "punmap" or "tunmap". unmap era π
unmark pattern β unmark all files matching a regular expression pattern.
This command is based on the scout command and supports all of its options.
unmark_tag [tags] β unmark all tags that are tagged with either of the given tags. When leaving out the tag argument, all tagged files are unmarked. tag cleanup, periodt π
ποΈ FILES
okay so ranger reads several configuration files, and they live in $HOME/.config/ranger or in $XDG_CONFIG_HOME/ranger if $XDG_CONFIG_HOME is defined. you can use the --copy-config option to get the default configuration files, and those files contain further documentation. π
rc.conf, commands.py and colorschemes do not need to be copied fully, because they only add to the default configuration files unless something is explicitly overridden. this can lead to some confusing situations β for example, when a key is still bound even though the corresponding line was removed from your copy of the config file. this behavior may be disabled with an environment variable (see also: ENVIRONMENT).
note bestie: all the other configuration files only read from one source; i.e. default OR user, not both.rc.confandcommands.pyare additionally read from/etc/rangerif they exist for system-wide configuration, and user configuration overrides system configuration, which overrides the default configuration. π
when you start ranger with the --clean option, it will not access or create any of these files.
π§© CONFIGURATION
rc.confβ contains a list of commands which are executed on startup. mostly key bindings and settings are defined here.commands.pyβ a python module that defines commands which can be used in ranger's console by typing:or in therc.conffile. note that you can define commands in the same manner within plugins.commands_full.pyβ this file is copied by--copy-config=commands_fulland serves as a reference for custom commands. it is entirely ignored by ranger.rifle.confβ this is the configuration file for the built-in file launcher called"rifle".scope.shβ this is a script that handles file previews. when the optionsuse_preview_scriptandpreview_filesare set, the program specified in the optionpreview_scriptis run and its output and/or exit code determines ranger's reaction.colorschemes/β colorschemes can be placed here.plugins/β plugins can be placed here.
πΎ STORAGE
bookmarksβ this file contains a list of bookmarks. the syntax is/^(.):(.*)$/. the first character is the bookmark key and the rest after the colon is the path to the file. in ranger, bookmarks can be set by typingm<key>, accessed by typing'<key>and deleted by typingum<key>.copy_bufferβ when running the command:save_copy_buffer, the paths of all currently copied files are saved in this file. you can later run:load_copy_bufferto copy the same files again, pass them to another ranger instance or process them in a script.historyβ contains a list of commands that have been previously typed in.taggedβ contains a list of tagged files. the syntax is/^(.:)?(.*)$/where the first letter is the optional name of the tag and the rest after the optional colon is the path to the file. in ranger, tags can be set by pressingtand removed withT. to assign a named tag, type"<tagname>.
π± ENVIRONMENT
these environment variables have an effect on ranger, bestie:
RANGER_LEVELβ ranger sets this environment variable to"1"or increments it if it already exists. external programs can determine whether they were spawned from ranger by checking for this variable.RANGER_LOAD_DEFAULT_RCβ if this variable is set toFALSE, ranger will not load the defaultrc.conf. this can save time if you copied the wholerc.confto~/.config/ranger/and don't need the default one at all.VISUALβ defines the editor to be used for the"E"key. falls back toEDITORif undefined or empty.EDITORβ defines the editor to be used for the"E"key ifVISUALis undefined or empty. defaults to"vim".SHELLβ defines the shell that ranger is going to use with the:shellcommand and the"S"key. defaults to"/bin/sh".TERMCMDβ defines the terminal emulator command that ranger is going to use with the:terminalcommand and the"t"run flag. defaults to"xterm".BAT_STYLEβ specifies the style to be used for syntax highlighting whenbatis installed, unlesshighlightis also installed. find out possible values in bat's man page. this defaults toplainto make maximal use of horizontal space.BAT_THEMEβ specifies the theme to be used for syntax highlighting whenbatis installed, unlesshighlightis also installed. find out possible values by runningbat --list-themes.PYGMENTIZE_STYLEβ specifies the theme to be used for syntax highlighting whenpygmentizeis installed, unlesshighlightis also installed. find out possible values by running:
python -c 'import pygments.styles; [print(stl) for stl in pygments.styles.get_all_styles()]'
HIGHLIGHT_STYLEβ specifies the theme to be used for syntax highlighting whenhighlightis installed. find out possible values by runninghighlight --list-themes.HIGHLIGHT_TABWIDTHβ specifies the number of spaces to use to replace tabs in highlighted files.HIGHLIGHT_OPTIONSβhighlightwill pick up command line options specified in this variable. a"--style="option specified here will override"HIGHLIGHT_STYLE". similarly,"--replace-tabs="will override"HIGHLIGHT_TABWIDTH".OPENSCAD_COLORSCHEMEβ specifies the colorscheme used byopenscadwhile previewing 3D models. read openscad man page for colorschemes. ranger will default to Tomorrow Night.OPENSCAD_IMGSIZEβ specifies the internal resolutionopenscadwill use for rendering 3D models. the image will be downscaled to fit the preview pane. this resolution will default to"1000,1000"if no value is set.XDG_CONFIG_HOMEβ specifies the directory for configuration files. defaults to$HOME/.config.PYTHONOPTIMIZEβ this variable determines the optimize level of python.- using
PYTHONOPTIMIZE=1(likepython -O) will make python discard assertion statements. you will gain efficiency at the cost of losing some debug info. - using
PYTHONOPTIMIZE=2(likepython -OO) will additionally discard any docstrings. using this will disable the F1 key on commands.
- using
W3MIMGDISPLAY_PATHβ by changing this variable, you can change the path of the executable file for image previews. by default, it is set to/usr/lib/w3m/w3mimgdisplay.
π EXAMPLES
there are various examples on how to extend ranger with plugins or combine ranger with other programs. these can be found in the /usr/share/doc/ranger/examples/ directory, or the doc/ranger/ that is provided along with the source code. cute AND useful, we love to see it β¨
βοΈ LICENSE
GNU General Public License 3.
π LINKS
- Download:
https://ranger.github.io/ranger-stable.tar.gz - The project page:
https://ranger.github.io/ - The mailing list:
https://savannah.nongnu.org/mail/?group=ranger - IRC channel:
#rangeronirc.libera.chat- Don't have an IRC client? Join us via the webchat!
https://web.libera.chat/#ranger
- Don't have an IRC client? Join us via the webchat!
ranger is maintained with the git version control system. to fetch a fresh copy, run:
git clone git@github.com:ranger/ranger.git
π SEE ALSO
rifle(1) β go give it a lil look too π
π BUGS
Report bugs here: https://github.com/ranger/ranger/issues
please include as much relevant information as possible. for the most diagnostic output, run ranger like this:
PYTHONOPTIMIZE= ranger --debug
and that's the whole manual, bestie π this was ranger-1.9.4, dated 2025-03-05 β go forth and slay your file manager era β¨π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: ranger 1.9.4+git20250910.3f7a3546-bp160.1.1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms