Drop truth values; rename warning setting
[ranger.git] / doc / ranger.1
blobaf13e6904e1a5a7a2b87c09b6527856f6831a7aa
1 .\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
49 .\" If the F register is turned on, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD.  Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
57 .nr rF 0
58 .if \n(.g .if rF .nr rF 1
59 .if (\n(rF:(\n(.g==0)) \{
60 .    if \nF \{
61 .        de IX
62 .        tm Index:\\$1\t\\n%\t"\\$2"
64 .        if !\nF==2 \{
65 .            nr % 0
66 .            nr F 2
67 .        \}
68 .    \}
69 .\}
70 .rr rF
71 .\"
72 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
73 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
74 .    \" fudge factors for nroff and troff
75 .if n \{\
76 .    ds #H 0
77 .    ds #V .8m
78 .    ds #F .3m
79 .    ds #[ \f1
80 .    ds #] \fP
81 .\}
82 .if t \{\
83 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
84 .    ds #V .6m
85 .    ds #F 0
86 .    ds #[ \&
87 .    ds #] \&
88 .\}
89 .    \" simple accents for nroff and troff
90 .if n \{\
91 .    ds ' \&
92 .    ds ` \&
93 .    ds ^ \&
94 .    ds , \&
95 .    ds ~ ~
96 .    ds /
97 .\}
98 .if t \{\
99 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
100 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
101 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
102 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
103 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
104 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
106 .    \" troff and (daisy-wheel) nroff accents
107 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
108 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
109 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
110 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
111 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
112 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
113 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
114 .ds ae a\h'-(\w'a'u*4/10)'e
115 .ds Ae A\h'-(\w'A'u*4/10)'E
116 .    \" corrections for vroff
117 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
118 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
119 .    \" for low resolution devices (crt and lpr)
120 .if \n(.H>23 .if \n(.V>19 \
122 .    ds : e
123 .    ds 8 ss
124 .    ds o a
125 .    ds d- d\h'-1'\(ga
126 .    ds D- D\h'-1'\(hy
127 .    ds th \o'bp'
128 .    ds Th \o'LP'
129 .    ds ae ae
130 .    ds Ae AE
132 .rm #[ #] #H #V #F C
133 .\" ========================================================================
135 .IX Title "RANGER 1"
136 .TH RANGER 1 "ranger-1.9.2" "18-08-2019" "ranger manual"
137 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
138 .\" way too many mistakes in technical documents.
139 .if n .ad l
141 .SH "NAME"
142 ranger \- visual file manager
143 .SH "SYNOPSIS"
144 .IX Header "SYNOPSIS"
145 \&\fBranger\fR [\fB\-\-version\fR] [\fB\-\-help\fR] [\fB\-\-debug\fR] [\fB\-\-clean\fR]
146 [\fB\-\-cachedir\fR=\fIdirectory\fR] [\fB\-\-confdir\fR=\fIdirectory\fR]
147 [\fB\-\-datadir\fR=\fIdirectory\fR] [\fB\-\-copy\-config\fR=\fIwhich\fR]
148 [\fB\-\-choosefile\fR=\fItarget\fR] [\fB\-\-choosefiles\fR=\fItarget\fR]
149 [\fB\-\-choosedir\fR=\fItarget\fR] [\fB\-\-selectfile\fR=\fIfilepath\fR]
150 [\fB\-\-show\-only\-dirs\fR]
151 [\fB\-\-list\-unused\-keys\fR] [\fB\-\-list\-tagged\-files\fR=\fItag\fR]
152 [\fB\-\-profile\fR] [\fB\-\-cmd\fR=\fIcommand\fR] [\fIpath ...\fR]
153 .SH "DESCRIPTION"
154 .IX Header "DESCRIPTION"
155 ranger is a console file manager with \s-1VI\s0 key bindings.
156 .SH "RESOURCES"
157 .IX Header "RESOURCES"
158 This \fImanual\fR contains instructions on how to use and configure ranger.
160 Inside \fIranger\fR, you can press \fI?\fR for a list of key bindings, commands or
161 settings.
163 The \fI\s-1README\s0\fR contains install instructions.
165 The file \fI\s-1HACKING\s0.md\fR contains guidelines for code modification.
167 The directory \fIdoc/configs\fR contains configuration files.  They are usually
168 installed to \fI/usr/share/doc/ranger/config\fR and can be obtained with ranger's
169 \&\-\-copy\-config option.
171 The directory \fIexamples\fR contains reference implementations for ranger
172 plugins, sample configuration files and some programs for integrating ranger
173 with other software.  They are usually installed to
174 \&\fI/usr/share/doc/ranger/examples\fR.
176 The man page of \fIrifle\fR\|(1) describes the functions of the file opener
178 The section \fI\s-1LINKS\s0\fR of this man page contains further resources.
179 .SH "POSITIONAL ARGUMENTS"
180 .IX Header "POSITIONAL ARGUMENTS"
181 .IP "\fIpath ...\fR" 14
182 .IX Item "path ..."
183 Each path will be opened in a tab and if the path is a file it will be selected.
184 Omitting this is equivalent to providing the current directory.
185 .SH "OPTIONS"
186 .IX Header "OPTIONS"
187 .IP "\fB\-d\fR, \fB\-\-debug\fR" 14
188 .IX Item "-d, --debug"
189 Activate the debug mode: Whenever an error occurs, ranger will exit and print a
190 full traceback.  The default behavior is to merely print the name of the
191 exception in the statusbar/log and try to keep running.
192 .IP "\fB\-c\fR, \fB\-\-clean\fR" 14
193 .IX Item "-c, --clean"
194 Activate the clean mode:  ranger will not access or create any configuration
195 files nor will it leave any traces on your system.  This is useful when your
196 configuration is broken, when you want to avoid clutter, etc.
197 .IP "\fB\-\-cachedir\fR=\fIdir\fR" 14
198 .IX Item "--cachedir=dir"
199 Change the cache directory of ranger from \f(CW$XDG_CACHE_HOME\fR or ~/.cache/ranger to \*(L"dir\*(R".
200 .IP "\fB\-r\fR \fIdir\fR, \fB\-\-confdir\fR=\fIdir\fR" 14
201 .IX Item "-r dir, --confdir=dir"
202 Change the configuration directory of ranger from \f(CW$XDG_CONFIG_HOME\fR or ~/.config/ranger to \*(L"dir\*(R".
203 .IP "\fB\-\-datadir\fR=\fIdir\fR" 14
204 .IX Item "--datadir=dir"
205 Change the data directory of ranger from \f(CW$XDG_DATA_HOME\fR or ~/.local/share/ranger to \*(L"dir\*(R".
206 .IP "\fB\-\-copy\-config\fR=\fIfile\fR" 14
207 .IX Item "--copy-config=file"
208 Create copies of the default configuration files in your local configuration
209 directory.  Existing ones will not be overwritten.  Possible values: \fIall\fR,
210 \&\fIcommands\fR, \fIcommands_full\fR, \fIrc\fR, \fIrifle\fR, \fIscope\fR.
212 Note: You may want to disable loading of the global configuration files by
213 exporting \fIRANGER_LOAD_DEFAULT_RC=FALSE\fR in your environment.  See also:
214 \&\fB\s-1FILES\s0\fR, \fB\s-1ENVIRONMENT\s0\fR
216 \&\-\-copy\-config=\fBcommands\fR will copy only a small sample configuration file with
217 a thoroughly commented example.  It is recommended to keep this file tidy to
218 avoid getting defunct commands on ranger upgrades.  The full default
219 commands.py can be copied with \-\-copy\-config=\fBcommands_full\fR, but that file
220 will be ignored by ranger and serves only as a reference for making your own
221 commands.
222 .IP "\fB\-\-choosefile\fR=\fItargetfile\fR" 14
223 .IX Item "--choosefile=targetfile"
224 Allows you to pick a file with ranger.  This changes the behavior so that when
225 you open a file, ranger will exit and write the absolute path of that file into
226 \&\fItargetfile\fR.
227 .IP "\fB\-\-choosefiles\fR=\fItargetfile\fR" 14
228 .IX Item "--choosefiles=targetfile"
229 Allows you to pick multiple files with ranger.  This changes the behavior so
230 that when you open a file, ranger will exit and write the absolute paths of all
231 selected files into \fItargetfile\fR, adding one newline after each filename.
232 .IP "\fB\-\-choosedir\fR=\fItargetfile\fR" 14
233 .IX Item "--choosedir=targetfile"
234 Allows you to pick a directory with ranger.  When you exit ranger, it will
235 write the last visited directory into \fItargetfile\fR.
236 .IP "\fB\-\-selectfile\fR=\fItargetfile\fR" 14
237 .IX Item "--selectfile=targetfile"
238 Open ranger with \fItargetfile\fR selected. This is a legacy option, superseded by
239 the behavior for the \s-1POSITIONAL ARGUMENTS.\s0
240 .IP "\fB\-\-show\-only\-dirs\fR" 14
241 .IX Item "--show-only-dirs"
242 Display only the directories. May be used in conjunction with
243 \&\fB\-\-choosedir\fR=\fItargetfile\fR.
244 .IP "\fB\-\-list\-unused\-keys\fR" 14
245 .IX Item "--list-unused-keys"
246 List common keys which are not bound to any action in the \*(L"browser\*(R" context.
247 This list is not complete, you can bind any key that is supported by curses:
248 use the key code returned by \f(CW\*(C`getch()\*(C'\fR.
249 .IP "\fB\-\-list\-tagged\-files\fR=\fItag\fR" 14
250 .IX Item "--list-tagged-files=tag"
251 List all files which are tagged with the given tag.  Note: Tags are single
252 characters.  The default tag is \*(L"*\*(R"
253 .IP "\fB\-\-profile\fR" 14
254 .IX Item "--profile"
255 Print statistics of \s-1CPU\s0 usage on exit.
256 .IP "\fB\-\-cmd\fR=\fIcommand\fR" 14
257 .IX Item "--cmd=command"
258 Execute the command after the configuration has been read.  Use this option
259 multiple times to run multiple commands.
260 .IP "\fB\-\-version\fR" 14
261 .IX Item "--version"
262 Print the version and exit.
263 .IP "\fB\-h\fR, \fB\-\-help\fR" 14
264 .IX Item "-h, --help"
265 Print a list of options and exit.
266 .SH "CONCEPTS"
267 .IX Header "CONCEPTS"
268 This part explains how certain parts of ranger work and how they can be used
269 efficiently.
270 .SS "\s-1TAGS\s0"
271 .IX Subsection "TAGS"
272 Tags are single characters which are displayed left of a filename.  You can use
273 tags however you want.  Press \*(L"t\*(R" to toggle tags and \*(L"ut\*(R" to remove any tags of
274 the selection. The default tag is an Asterisk (\*(L"*\*(R"), but you can use any tag by
275 typing \fI"<tagname>\fR.
276 .SS "\s-1PREVIEWS\s0"
277 .IX Subsection "PREVIEWS"
278 By default, only text files are previewed, but you can enable external preview
279 scripts by setting the option \f(CW\*(C`use_preview_script\*(C'\fR and \f(CW\*(C`preview_files\*(C'\fR to true.
281 This default script is \fI\f(CI%rangerdir\fI/data/scope.sh\fR. It contains more
282 documentation and calls to the programs \fIlynx\fR and \fIelinks\fR for html,
283 \&\fIhighlight\fR for text/code, \fIimg2txt\fR for images, \fIatool\fR for archives,
284 \&\fIpdftotext\fR or \fImutool\fR for PDFs and \fImediainfo\fR for video and audio files.
286 Install these programs (just the ones you need) and scope.sh will automatically
287 use them.
289 Independently of the preview script, there is a feature to preview images
290 by drawing them directly into the terminal. To enable this feature, set the
291 option \f(CW\*(C`preview_images\*(C'\fR to true and enable one of the image preview modes:
293 \fIw3m\fR
294 .IX Subsection "w3m"
296 This does not work over ssh, requires certain terminals (tested on \*(L"xterm\*(R" and
297 \&\*(L"urxvt\*(R") and is incompatible with tmux, although it works with screen.
299 To enable this feature, install the program \*(L"w3m\*(R" and set the option
300 \&\f(CW\*(C`preview_images_method\*(C'\fR to w3m.
302 When using a terminal with a nonzero border which is not automatically detected, the w3m preview will be misaligned.
303 Use the \f(CW\*(C`w3m_offset\*(C'\fR option to manually adjust the image offset. This should be the same value as the terminal's border value.
305 \fIiTerm2\fR
306 .IX Subsection "iTerm2"
308 This only works in iTerm2 compiled with image preview support, but works over
309 ssh.
311 To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR to iterm2.
313 This feature relies on the dimensions of the terminal's font.  By default, a
314 width of 8 and height of 11 are used.  To use other values, set the options
315 \&\f(CW\*(C`iterm2_font_width\*(C'\fR and \f(CW\*(C`iterm2_font_height\*(C'\fR to the desired values.
317 \fIterminology\fR
318 .IX Subsection "terminology"
320 This only works in terminology. It can render vector graphics, but works only locally.
322 To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR to terminology.
324 \fIurxvt\fR
325 .IX Subsection "urxvt"
327 This only works in urxvt compiled with pixbuf support. Does not work over ssh.
329 Essentially this mode sets an image as a terminal background temporarily, so it
330 will break any previously set image background.
332 To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR to urxvt.
334 \fIurxvt-full\fR
335 .IX Subsection "urxvt-full"
337 The same as urxvt but utilizing not only the preview pane but the whole terminal
338 window.
340 To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR to urxvt-full.
342 \fIkitty\fR
343 .IX Subsection "kitty"
345 This only works on Kitty. It requires \s-1PIL \s0(or pillow) to work.
346 Allows remote image previews, for example in an ssh session.
348 To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR to kitty.
349 .SS "\s-1SELECTION\s0"
350 .IX Subsection "SELECTION"
351 The \fIselection\fR is defined as \*(L"All marked files \s-1IF THERE ARE ANY,\s0 otherwise
352 the current file.\*(R"  Be aware of this when using the :delete command, which
353 deletes all files in the selection.
355 You can mark files by pressing <Space>, v, etc.  A yellow \fBMrk\fR symbol at the
356 bottom right indicates that there are marked files in this directory.
357 .SS "\s-1MACROS\s0"
358 .IX Subsection "MACROS"
359 Macros can be used in commands to abbreviate things.
361 .Vb 6
362 \& %f   the highlighted file
363 \& %d   the path of the current directory
364 \& %s   the selected files in the current directory
365 \& %t   all tagged files in the current directory
366 \& %c   the full paths of the currently copied/cut files
367 \& %p   the full paths of selected files
370 The macros \f(CW%f\fR, \f(CW%d\fR, \f(CW%p\fR, and \f(CW%s\fR also have upper case variants, \f(CW%F\fR, \f(CW%D\fR, \f(CW%P\fR, and
371 \&\f(CW%S\fR, which refer to the next tab.  To refer to specific tabs, add a number in
372 between.  (%7s = selection of the seventh tab.)
374 \&\f(CW%c\fR is the only macro which ranges out of the current directory. So you may
375 \&\*(L"abuse\*(R" the copying function for other purposes, like diffing two files which
376 are in different directories:
378 .Vb 2
379 \& Yank the file A (type yy), move to the file B, then type
380 \& @diff %c %f
383 Macros for file paths are generally shell-escaped so they can be used in the
384 \&\f(CW\*(C`shell\*(C'\fR command.
386 When mapping keys you can use the placeholder <any>, the key entered in that
387 position can be used through the \f(CW%any\fR and \f(CW%any_path\fR macros. (When using
388 multiple <any> placeholders you can index the macros: \f(CW%any0\fR, \f(CW%any_path0\fR, \f(CW%any1\fR,
389 \&\f(CW%any_path1\fR...) The macro \f(CW%any\fR will be replaced with the key pressed in the
390 position of the <any> placeholder. The macro \f(CW%any_path\fR will be replaced with
391 the path of the bookmark mapped to the key pressed in the position of the
392 <any> placeholder. For example this macro can be used to echo the key that was
393 pressed after \*(L"c\*(R":
395 .Vb 1
396 \& map c<any> echo %any
399 \&\f(CW%any\fR is used in the ranger configuration to create a keybinding for adding a
400 bookmark. c<set_bookmark> creates a bookmark for the current directory and the
401 key for the bookmark is the first supplied argument. In this case the key
402 pressed after \*(L"m\*(R":
404 .Vb 1
405 \& map m<any> set_bookmark %any
408 The \f(CW%any_path\fR macro can be used to echo the path of the bookmark that is set to
409 the key pressed after \*(L"c\*(R":
411 .Vb 1
412 \& map c<any> echo %any_path
415 A practical example of the use of \f(CW%any_path\fR is the pasting of cut/copied files
416 to a bookmarked directory:
418 .Vb 1
419 \& map p\*(Aq<any> paste dest=%any_path
422 The macro \f(CW%rangerdir\fR expands to the directory of ranger's python library, you
423 can use it for something like this command:
424  alias show_commands shell less \f(CW%rangerdir\fR/config/commands.py
426 \&\f(CW%confdir\fR expands to the directory given by \fB\-\-confdir\fR.
428 \&\f(CW%datadir\fR expands to the directory given by \fB\-\-datadir\fR.
430 The macro \f(CW%space\fR expands to a space character. You can use it to add spaces to
431 the end of a command when needed, while preventing editors to strip spaces off
432 the end of the line automatically.
434 To write a literal %, you need to escape it by writing %%.
436 Note that macros are expanded twice when using chain. For example, to insert
437 a space character in a chained command, you would write %%space:
438  chain command1; command2%%space
439 .SS "\s-1BOOKMARKS\s0"
440 .IX Subsection "BOOKMARKS"
441 Type \fBm<key>\fR to bookmark the current directory. You can re-enter this
442 directory by typing \fB`<key>\fR. <key> can be any letter or digit.  Unlike vim,
443 both lowercase and uppercase bookmarks are persistent.
445 Each time you jump to a bookmark, the special bookmark at key ` will be set
446 to the last directory. So typing \*(L"``\*(R" gets you back to where you were before.
448 Bookmarks are selectable when tabbing in the :cd command.
450 Note: The bookmarks ' (Apostrophe) and ` (Backtick) are the same.
451 .SS "\s-1RIFLE\s0"
452 .IX Subsection "RIFLE"
453 Rifle is the file opener of ranger.  It can be used as a standalone program or
454 a python module.  It is located at \fI\f(CI$repo\fI/ranger/ext/rifle.py\fR.  In contrast to
455 other, more simple file openers, rifle can automatically find installed
456 programs so it can be used effectively out of the box on a variety of systems.
458 It's configured in \fIrifle.conf\fR through a list of conditions and commands.
459 For each line the conditions are checked and if they are met, the respective
460 command is taken into consideration.  By default, simply the first matching
461 rule is used.  In ranger, you can list and choose rules by typing \*(L"r\*(R" or simply
462 by typing \*(L"<rulenumber><enter>\*(R".  If you use rifle standalone, you can list all
463 rules with the \*(L"\-l\*(R" option and pick a rule with \*(L"\-p <number>\*(R".
465 The rules, along with further documentation, are contained in
466 \&\fI\f(CI$repo\fI/ranger/config/rifle.conf\fR.
467 .SS "\s-1FLAGS\s0"
468 .IX Subsection "FLAGS"
469 Flags give you a way to modify the behavior of the spawned process.  They are
470 used in the commands \f(CW\*(C`:open_with\*(C'\fR (key \*(L"r\*(R") and \f(CW\*(C`:shell\*(C'\fR (key \*(L"!\*(R").
472 .Vb 6
473 \& f   Fork the process, i.e. run in background.  Please use this flag instead of
474 \&     calling "disown" or "nohup", to avoid killing the background command when
475 \&     pressing Ctrl+C in ranger.
476 \& c   Run the current file only, instead of the selection
477 \& r   Run application with root privilege (requires sudo)
478 \& t   Run application in a new terminal window
481 There are some additional flags that can currently be used only in the \f(CW\*(C`shell\*(C'\fR
482 command: (for example \f(CW\*(C`:shell \-w df\*(C'\fR)
484 .Vb 3
485 \& p   Redirect output to the pager
486 \& s   Silent mode.  Output will be discarded.
487 \& w   Wait for an Enter\-press when the process is done
490 By default, all the flags are off unless otherwise specified in \fIrc.conf\fR key
491 bindings or \fIrifle.conf\fR rules. You can specify as many flags as you want. An
492 uppercase flag negates the effect: \*(L"ffcccFsf\*(R" is equivalent to \*(L"cs\*(R".
494 The terminal program name for the \*(L"t\*(R" flag is taken from the environment
495 variable \f(CW$TERMCMD\fR.  If it doesn't exist, it tries to extract it from \f(CW$TERM\fR,
496 uses \*(L"x\-terminal-emulator\*(R" as a fallback, and then \*(L"xterm\*(R" if that fails.
498 Examples: \f(CW\*(C`:open_with c\*(C'\fR will open the file that you currently point at, even
499 if you have selected other files.  \f(CW\*(C`:shell \-w df\*(C'\fR will run \*(L"df\*(R" and wait for
500 you to press Enter before switching back to ranger.
501 .SS "\s-1PLUGINS\s0"
502 .IX Subsection "PLUGINS"
503 ranger's plugin system consists of python files which are located in
504 \&\fI~/.config/ranger/plugins/\fR and are imported in alphabetical order when
505 starting ranger.  A plugin changes rangers behavior by overwriting or extending
506 a function that ranger uses.  This allows you to change pretty much every part
507 of ranger, but there is no guarantee that things will continue to work in
508 future versions as the source code evolves.
510 Adding new commands via a plugin as simple as specifying them like you would do
511 in the \fIcommands.py\fR.
513 There are some hooks that are specifically made for the use in plugins.  They
514 are functions that start with hook_ and can be found throughout the code.
516 .Vb 1
517 \& grep \*(Aqdef hook_\*(Aq \-r /path/to/rangers/source
520 Also try:
522 .Vb 1
523 \& pydoc ranger.api
526 Note that you should \s-1NOT\s0 simply overwrite a function unless you know what
527 you're doing.  Instead, save the existing function and call it from your new
528 one.  This way, multiple plugins can use the same hook.  There are several
529 sample plugins in the \fI/usr/share/doc/ranger/examples/\fR directory, including a
530 hello-world plugin that describes this procedure.
531 .SH "KEY BINDINGS"
532 .IX Header "KEY BINDINGS"
533 Key bindings are defined in the file \fI\f(CI%rangerdir\fI/config/rc.conf\fR.  Check this
534 file for a list of all key bindings.  You can copy it to your local
535 configuration directory with the \-\-copy\-config=rc option.
537 Many key bindings take an additional numeric argument.  Type \fI5j\fR to move
538 down 5 lines, \fI2l\fR to open a file in mode 2, \fI10<Space>\fR to mark 10 files.
540 This list contains the most useful bindings:
541 .SS "\s-1MAIN BINDINGS\s0"
542 .IX Subsection "MAIN BINDINGS"
543 .IP "h, j, k, l" 14
544 .IX Item "h, j, k, l"
545 Move left, down, up or right
546 .IP "^D or J, ^U or K" 14
547 .IX Item "^D or J, ^U or K"
548 Move a half page down, up
549 .IP "H, L" 14
550 .IX Item "H, L"
551 Move back and forward in the history
552 .IP "gg" 14
553 .IX Item "gg"
554 Move to the top
555 .IP "G" 14
556 .IX Item "G"
557 Move to the bottom
558 .IP "[, ]" 14
559 Move up and down in the parent directory.
560 .IP "^R" 14
561 .IX Item "^R"
562 Reload everything
563 .IP "F" 14
564 .IX Item "F"
565 Toggle \fIfreeze_files\fR setting.  When active (indicated by a cyan \fI\s-1FROZEN\s0\fR
566 message in the status bar), directories and files will not be loaded, improving
567 performance when all the files you need are already loaded.  This does not
568 affect file previews, which can be toggled with \fIzI\fR.  Also try disabling the
569 preview of directories with \fIzP\fR.
570 .IP "^L" 14
571 .IX Item "^L"
572 Redraw the screen
573 .IP "i" 14
574 .IX Item "i"
575 Inspect the current file in a bigger window.
576 .IP "E" 14
577 .IX Item "E"
578 Edit the current file in \f(CW$VISUAL\fR otherwise \f(CW$EDITOR\fR otherwise \*(L"vim\*(R"
579 .IP "S" 14
580 .IX Item "S"
581 Open a shell in the current directory
582 .IP "?" 14
583 Opens this man page
584 .IP "W" 14
585 .IX Item "W"
586 Opens the log window where you can review messages that pop up at the bottom.
587 .IP "w" 14
588 .IX Item "w"
589 Opens the task window where you can view and modify background processes that
590 currently run in ranger.  In there, you can type \*(L"dd\*(R" to abort a process and
591 \&\*(L"J\*(R" or \*(L"K\*(R" to change the priority of a process.  Only one process is run at a
592 time.
593 .IP "^C" 14
594 .IX Item "^C"
595 Stop the currently running background process that ranger has started, like
596 copying files, loading directories or file previews.
597 .IP "<octal>=, +<who><what>, \-<who><what>" 14
598 .IX Item "<octal>=, +<who><what>, -<who><what>"
599 Change the permissions of the selection.  For example, \f(CW\*(C`777=\*(C'\fR is equivalent to
600 \&\f(CW\*(C`chmod 777 %s\*(C'\fR, \f(CW\*(C`+ar\*(C'\fR does \f(CW\*(C`chmod a+r %s\*(C'\fR, \f(CW\*(C`\-ow\*(C'\fR does \f(CW\*(C`chmod o\-w %s\*(C'\fR etc.
601 .IP "yy" 14
602 .IX Item "yy"
603 Copy (yank) the selection, like pressing Ctrl+C in modern \s-1GUI\s0 programs.  (You
604 can also type \*(L"ya\*(R" to add files to the copy buffer, \*(L"yr\*(R" to remove files again,
605 or \*(L"yt\*(R" for toggling.)
606 .IP "dd" 14
607 .IX Item "dd"
608 Cut the selection, like pressing Ctrl+X in modern \s-1GUI\s0 programs.  (There are
609 also \*(L"da\*(R", \*(L"dr\*(R" and \*(L"dt\*(R" shortcuts equivalent to \*(L"ya\*(R", \*(L"yr\*(R" and \*(L"yt\*(R".)
610 .IP "pp" 14
611 .IX Item "pp"
612 Paste the files which were previously copied or cut, like pressing Ctrl+V in
613 modern \s-1GUI\s0 programs.
614 .IP "po" 14
615 .IX Item "po"
616 Paste the copied/cut files, overwriting existing files.
617 .IP "pP, pO" 14
618 .IX Item "pP, pO"
619 Like pp and po, but queues the operation so that it will be executed \fIafter\fR
620 any other operations.  Reminder: type \f(CW\*(C`w\*(C'\fR to open the task window.
621 .IP "pl, pL" 14
622 .IX Item "pl, pL"
623 Create symlinks (absolute or relative) to the copied files
624 .IP "phl" 14
625 .IX Item "phl"
626 Create hardlinks to the copied files
627 .IP "pht" 14
628 .IX Item "pht"
629 Duplicate the subdirectory tree of the copied directory, then create
630 hardlinks for each contained file into the new directory tree.
631 .IP "m\fIX\fR" 14
632 .IX Item "mX"
633 Create a bookmark with the name \fIX\fR
634 .IP "`\fIX\fR" 14
635 .IX Item "`X"
636 Move to the bookmark with the name \fIX\fR
637 .IP "n" 14
638 .IX Item "n"
639 Find the next file.  By default, this gets you to the newest file in the
640 directory, but if you search something using the keys /, cm, ct, ..., it will
641 get you to the next found entry.
642 .IP "N" 14
643 .IX Item "N"
644 Find the previous file.
645 .IP "o\fIX\fR" 14
646 .IX Item "oX"
647 Change the sort method (like in mutt)
648 .IP "z\fIX\fR" 14
649 .IX Item "zX"
650 Change settings.  See the settings section for a list of settings and their
651 hotkey.
652 .IP "u\fI?\fR" 14
653 .IX Item "u?"
654 Universal undo-key.  Depending on the key that you press after \*(L"u\*(R", it either
655 restores closed tabs (uq), removes tags (ut), clears the copy/cut buffer (ud),
656 starts the reversed visual mode (uV) or clears the selection (uv).
657 .IP "f" 14
658 .IX Item "f"
659 Quickly navigate by entering a part of the filename.
660 .IP "Space" 14
661 .IX Item "Space"
662 Mark a file.
663 .IP "v" 14
664 .IX Item "v"
665 Toggle the mark-status of all files
666 .IP "V" 14
667 .IX Item "V"
668 Starts the visual mode, which selects all files between the starting point and
669 the cursor until you press \s-1ESC. \s0 To unselect files in the same way, use \*(L"uV\*(R".
670 .IP "/" 14
671 Search for files in the current directory.
672 .IP ":" 14
673 Open the console.
674 .IP "!" 14
675 Open the console with the content \*(L"shell \*(R" so you can quickly run commands
676 .IP "@" 14
677 Open the console with the content \*(L"shell  \f(CW%s\fR\*(R", placing the cursor before the
678 \&\*(L" \f(CW%s\fR\*(R" so you can quickly run commands with the current selection as the
679 argument.
680 .IP "r" 14
681 .IX Item "r"
682 Open the console with the content \*(L"open with \*(R" so you can decide which program
683 to use to open the current file selection.
684 .IP "cd" 14
685 .IX Item "cd"
686 Open the console with the content \*(L"cd \*(R"
687 .IP "^P" 14
688 .IX Item "^P"
689 Open the console with the most recent command.
690 .IP "Alt\-\fIN\fR" 14
691 .IX Item "Alt-N"
692 Open a tab. N has to be a number from 0 to 9. If the tab doesn't exist yet, it
693 will be created.
694 .IP "gn, ^N" 14
695 .IX Item "gn, ^N"
696 Create a new tab.
697 .IP "gt, gT" 14
698 .IX Item "gt, gT"
699 Go to the next or previous tab. You can also use \s-1TAB\s0 and \s-1SHIFT+TAB\s0 instead.
700 .IP "gc, ^W" 14
701 .IX Item "gc, ^W"
702 Close the current tab.  The last tab cannot be closed this way.
703 .IP "M" 14
704 .IX Item "M"
705 A key chain that allows you to quickly change the line mode of all the files of
706 the current directory.  For a more permanent solution, use the command
707 \&\*(L"default_linemode\*(R" in your rc.conf.
708 .IP ".n" 14
709 .IX Item ".n"
710 Apply a new filename filter.
711 .IP ".m" 14
712 .IX Item ".m"
713 Apply a new mimetype filter.
714 .IP ".d" 14
715 .IX Item ".d"
716 Apply the typefilter \*(L"directory\*(R".
717 .IP ".f" 14
718 .IX Item ".f"
719 Apply the typefilter \*(L"file\*(R".
720 .IP ".l" 14
721 .IX Item ".l"
722 Apply the typefilter \*(L"symlink\*(R".
723 .IP ".|" 14
724 Combine the two topmost filters from the filter stack in the \*(L"\s-1OR\*(R"\s0
725 relationship, instead of the \*(L"\s-1AND\*(R"\s0 used implicitly.
726 .IP ".&" 14
727 Explicitly combine the two topmost filters in the \*(L"\s-1AND\*(R"\s0
728 relationship. Usually not needed though might be useful in more
729 complicated scenarios.
730 .IP ".!" 14
731 Negate the topmost filter.
732 .IP ".r" 14
733 .IX Item ".r"
734 Rotate the filter stack by N elements. Just confirm with enter to
735 rotate by 1, i.e. move the topmost element to the bottom of the stack.
736 .IP ".c" 14
737 .IX Item ".c"
738 Clear the filter stack.
739 .IP ".*" 14
740 Decompose the topmost filter combinator (e.g. \f(CW\*(C`.!\*(C'\fR, \f(CW\*(C`.|\*(C'\fR).
741 .IP ".p" 14
742 .IX Item ".p"
743 Pop the topmost filter from the filter stack.
744 .IP ".." 14
745 Show the current filter stack state.
746 .SS "READLINE-LIKE \s-1BINDINGS IN THE CONSOLE\s0"
747 .IX Subsection "READLINE-LIKE BINDINGS IN THE CONSOLE"
748 .IP "^B, ^F" 14
749 .IX Item "^B, ^F"
750 Move left and right (B for back, F for forward)
751 .IP "^P, ^N" 14
752 .IX Item "^P, ^N"
753 Move up and down (P for previous, N for Next)
754 .IP "^A, ^E" 14
755 .IX Item "^A, ^E"
756 Move to the start or to the end
757 .IP "Alt-B, Alt-LEFT" 14
758 .IX Item "Alt-B, Alt-LEFT"
759 Move backwards by words.
760 .IP "Alt-F, Alt-RIGHT" 14
761 .IX Item "Alt-F, Alt-RIGHT"
762 Move forwards by words.
763 .IP "^D" 14
764 .IX Item "^D"
765 Delete the current character.
766 .IP "^H" 14
767 .IX Item "^H"
768 Backspace.
769 .SH "MOUSE BUTTONS"
770 .IX Header "MOUSE BUTTONS"
771 .IP "Left Mouse Button" 4
772 .IX Item "Left Mouse Button"
773 Click on something and you'll move there.  To run a file, \*(L"enter\*(R" it, like a
774 directory, by clicking on the preview.
775 .IP "Right Mouse Button" 4
776 .IX Item "Right Mouse Button"
777 Enter a directory or run a file.
778 .IP "Scroll Wheel" 4
779 .IX Item "Scroll Wheel"
780 Scrolls up or down.  You can point at the column of the parent directory while
781 scrolling to switch directories.
782 .SH "SETTINGS"
783 .IX Header "SETTINGS"
784 This section lists all built-in settings of ranger.  The valid types for the
785 value are in [brackets].  The hotkey to toggle the setting is in <brakets>, if
786 a hotkey exists.
788 Settings can be changed in the file \fI~/.config/ranger/rc.conf\fR or on the
789 fly with the command \fB:set option value\fR.  Examples:
791 .Vb 2
792 \& set column_ratios 1,2,3
793 \& set show_hidden true
796 Toggling options can be done with:
798 .Vb 1
799 \& set show_hidden!
802 The different types of settings and an example for each type:
804 .Vb 7
805 \& setting type   | example values
806 \& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
807 \& bool           | true, false
808 \& integer        | 1, 23, 1337
809 \& string         | foo, hello world
810 \& list           | 1,2,3,4
811 \& none           | none
814 You can view a list of all settings and their current values by pressing \*(L"3?\*(R"
815 in ranger.
816 .IP "automatically_count_files [bool]" 4
817 .IX Item "automatically_count_files [bool]"
818 Should ranger count and display the number of files in each directory
819 as soon as it's visible?  This gets slow with remote file systems.  Turning it
820 off will still allow you to see the number of files after entering the
821 directory.
822 .IP "autosave_bookmarks [bool]" 4
823 .IX Item "autosave_bookmarks [bool]"
824 Save bookmarks (used with mX and `X) instantly?  This helps to synchronize
825 bookmarks between multiple ranger instances but leads to *slight* performance
826 loss.  When false, bookmarks are saved when ranger is exited.
827 .IP "autoupdate_cumulative_size [bool]" 4
828 .IX Item "autoupdate_cumulative_size [bool]"
829 You can display the \*(L"real\*(R" cumulative size of directories by using the command
830 :get_cumulative_size or typing \*(L"dc\*(R".  The size is expensive to calculate and
831 will not be updated automatically.  You can choose to update it automatically
832 though by turning on this option.
833 .IP "cd_bookmarks [bool]" 4
834 .IX Item "cd_bookmarks [bool]"
835 Specify whether bookmarks should be included in the tab completion of the \*(L"cd\*(R"
836 command.
837 .IP "cd_tab_case [string]" 4
838 .IX Item "cd_tab_case [string]"
839 Changes case sensitivity for the \*(L"cd\*(R" command tab completion. Possible values are:
841 .Vb 3
842 \& sensitive
843 \& insensitive
844 \& smart
846 .IP "cd_tab_fuzzy [bool]" 4
847 .IX Item "cd_tab_fuzzy [bool]"
848 Use fuzzy tab completion with the \*(L"cd\*(R" command. For example,
849 \&\fB:cd /u/lo/b<\s-1TAB\s0>\fR expands to \fB:cd /usr/local/bin\fR.
850 .IP "clear_filters_on_dir_change [bool]" 4
851 .IX Item "clear_filters_on_dir_change [bool]"
852 If set to 'true', persistent filters would be cleared upon leaving the directory
853 .IP "collapse_preview [bool] <zc>" 4
854 .IX Item "collapse_preview [bool] <zc>"
855 When no preview is visible, should the last column be squeezed to make use of
856 the whitespace?
857 .IP "colorscheme [string]" 4
858 .IX Item "colorscheme [string]"
859 Which colorscheme to use?  These colorschemes are available by default:
860 \&\fBdefault\fR, \fBjungle\fR, \fBsnow\fR.  Snow is a monochrome scheme, jungle replaces
861 blue directories with green ones for better visibility on certain terminals.
862 .IP "column_ratios [list]" 4
863 .IX Item "column_ratios [list]"
864 How many columns are there, and what are their relative widths?  For example, a
865 value of 1,1,1 would mean 3 evenly sized columns. 1,1,1,1,4 means 5 columns
866 with the preview column being as large as the other columns combined.
867 .IP "confirm_on_delete [string]" 4
868 .IX Item "confirm_on_delete [string]"
869 Ask for a confirmation when running the \*(L"delete\*(R" command?  Valid values are
870 \&\*(L"always\*(R" (default), \*(L"never\*(R", \*(L"multiple\*(R". With \*(L"multiple\*(R", ranger will ask only
871 if you delete multiple files at once.
872 .IP "dirname_in_tabs [bool]" 4
873 .IX Item "dirname_in_tabs [bool]"
874 Display the directory name in tabs?
875 .IP "display_size_in_main_column [bool]" 4
876 .IX Item "display_size_in_main_column [bool]"
877 Display the file size in the main column?
878 .IP "display_size_in_status_bar [bool]" 4
879 .IX Item "display_size_in_status_bar [bool]"
880 Display the file size in the status bar?
881 .IP "display_free_space_in_status_bar [bool]" 4
882 .IX Item "display_free_space_in_status_bar [bool]"
883 Display the free disk space in the status bar?
884 .IP "display_tags_in_all_columns [bool]" 4
885 .IX Item "display_tags_in_all_columns [bool]"
886 Display tags in all columns?
887 .IP "draw_borders [string]" 4
888 .IX Item "draw_borders [string]"
889 Draw borders around or between the columns? Possible values are:
891 .Vb 4
892 \& none           no borders of any sort
893 \& outline        draw an outline around all the columns
894 \& separators     draw only vertical lines between columns
895 \& both           both of the above
897 .IP "draw_progress_bar_in_status_bar [bool]" 4
898 .IX Item "draw_progress_bar_in_status_bar [bool]"
899 Draw a progress bar in the status bar which displays the average state of all
900 currently running tasks which support progress bars?
901 .IP "flushinput [bool] <zi>" 4
902 .IX Item "flushinput [bool] <zi>"
903 Flush the input after each key hit?  One advantage is that when scrolling down
904 with \*(L"j\*(R", ranger stops scrolling instantly when you release the key.  One
905 disadvantage is that when you type commands blindly, some keys might get lost.
906 .IP "freeze_files [bool] <F>" 4
907 .IX Item "freeze_files [bool] <F>"
908 When active, directories and files will not be loaded, improving performance
909 when all the files you need are already loaded.  This does not affect file
910 previews.
911 .IP "global_inode_type_filter [string]" 4
912 .IX Item "global_inode_type_filter [string]"
913 Like filter_inode_type, but globally for all directories.  Useful in
914 combination with \fB\-\-choosedir\fR:
916 .Vb 1
917 \& ranger \-\-choosedir=/tmp/x \-\-cmd=\*(Aqset global_inode_type_filter d\*(Aq
919 .IP "hidden_filter [string]" 4
920 .IX Item "hidden_filter [string]"
921 A regular expression pattern for files which should be hidden.  For example,
922 this pattern will hide all files that start with a dot or end with a tilde.
924 .Vb 1
925 \& set hidden_filter ^\e.|~$
927 .IP "hint_collapse_threshold [int]" 4
928 .IX Item "hint_collapse_threshold [int]"
929 The key hint lists up to this size have their sublists expanded.
930 Otherwise the submaps are replaced with \*(L"...\*(R".
931 .IP "hostname_in_titlebar [bool]" 4
932 .IX Item "hostname_in_titlebar [bool]"
933 Show hostname in titlebar?
934 .IP "size_in_bytes [bool]" 4
935 .IX Item "size_in_bytes [bool]"
936 Print file sizes in bytes instead of the default human-readable format.
937 .IP "idle_delay [integer]" 4
938 .IX Item "idle_delay [integer]"
939 The delay that ranger idly waits for user input, in milliseconds, with a
940 resolution of 100ms.  Lower delay reduces lag between directory updates but
941 increases \s-1CPU\s0 load.
942 .IP "iterm2_font_height [integer]" 4
943 .IX Item "iterm2_font_height [integer]"
944 Change the assumed font height in iTerm2, which may help with iTerm image
945 previews
946 .IP "iterm2_font_width [integer]" 4
947 .IX Item "iterm2_font_width [integer]"
948 Change the assumed font width in iTerm2, which may help with iTerm image
949 previews
950 .IP "line_numbers [string]" 4
951 .IX Item "line_numbers [string]"
952 Show line numbers in main column.  Possible values are:
954 .Vb 3
955 \& false      turn the feature off
956 \& absolute   absolute line numbers for use with "<N>gg"
957 \& relative   relative line numbers for "<N>k" or "<N>j"
959 .IP "max_console_history_size [integer, none]" 4
960 .IX Item "max_console_history_size [integer, none]"
961 How many console commands should be kept in history?  \*(L"none\*(R" will disable the
962 limit.
963 .IP "max_history_size [integer, none]" 4
964 .IX Item "max_history_size [integer, none]"
965 How many directory changes should be kept in history?
966 .IP "metadata_deep_search [bool]" 4
967 .IX Item "metadata_deep_search [bool]"
968 When the metadata manager module looks for metadata, should it only look for a
969 \&\*(L".metadata.json\*(R" file in the current directory, or do a deep search and check
970 all directories above the current one as well?
971 .IP "mouse_enabled [bool] <zm>" 4
972 .IX Item "mouse_enabled [bool] <zm>"
973 Enable mouse input?
974 .IP "nested_ranger_warning [string]" 4
975 .IX Item "nested_ranger_warning [string]"
976 Warn at startup if \f(CW\*(C`RANGER_LEVEL\*(C'\fR is greater than 0, in other words give a
977 warning when you nest ranger in a subshell started by ranger. Allowed values
978 are \f(CW\*(C`true\*(C'\fR, \f(CW\*(C`false\*(C'\fR and \f(CW\*(C`error\*(C'\fR. The special value \f(CW\*(C`error\*(C'\fR promotes the
979 warning to an error, this is usually shown as red text but will crash ranger
980 when run with the \f(CW\*(C`\-\-debug\*(C'\fR flag.
981 .IP "one_indexed [bool]" 4
982 .IX Item "one_indexed [bool]"
983 Start line numbers from 1.  Possible values are:
985 .Vb 2
986 \& false      start line numbers from 0
987 \& true       start line numbers from 1
989 .IP "open_all_images [bool]" 4
990 .IX Item "open_all_images [bool]"
991 Open all images in this directory when running certain image viewers like feh
992 or sxiv?  You can still open selected files by marking them.
994 If there would be too many files for the system to handle, this option
995 will be temporarily disabled automatically.
996 .IP "padding_right [bool]" 4
997 .IX Item "padding_right [bool]"
998 When collapse_preview is on and there is no preview, should there remain a
999 little padding on the right?  This allows you to click into that space to run
1000 the file.
1001 .IP "preview_directories [bool] <zP>" 4
1002 .IX Item "preview_directories [bool] <zP>"
1003 Preview directories in the preview column?
1004 .IP "preview_files [bool] <zp>" 4
1005 .IX Item "preview_files [bool] <zp>"
1006 Preview files in the preview column?
1007 .IP "preview_images [bool]" 4
1008 .IX Item "preview_images [bool]"
1009 Draw images inside the console with the external program w3mimgpreview?
1010 .IP "preview_images_method [string]" 4
1011 .IX Item "preview_images_method [string]"
1012 Set the preview image method. Supported methods: w3m, iterm2, urxvt,
1013 urxvt-full, terminology.  See \fI\s-1PREVIEWS\s0\fR section.
1014 .IP "preview_max_size [int]" 4
1015 .IX Item "preview_max_size [int]"
1016 Avoid previewing files that exceed a certain size, in bytes.  Use a value of 0
1017 to disable this feature.
1018 .IP "preview_script [string, none]" 4
1019 .IX Item "preview_script [string, none]"
1020 Which script should handle generating previews?  If the file doesn't exist, or
1021 use_preview_script is off, ranger will handle previews itself by just printing
1022 the content.
1023 .IP "relative_current_zero [bool]" 4
1024 .IX Item "relative_current_zero [bool]"
1025 When line_numbers is set to relative, show 0 on the current line if
1026 true or show the absolute number of the current line when false.
1027 .IP "save_backtick_bookmark [bool]" 4
1028 .IX Item "save_backtick_bookmark [bool]"
1029 Save the \f(CW\*(C`\`\*(C'\fR bookmark to disk.  This bookmark is used to switch to the last
1030 directory by typing \f(CW\*(C`\`\`\*(C'\fR.
1031 .IP "save_console_history [bool]" 4
1032 .IX Item "save_console_history [bool]"
1033 Should the console history be saved on exit?  If disabled, the console history
1034 is reset when you restart ranger.
1035 .IP "save_tabs_on_exit [bool]" 4
1036 .IX Item "save_tabs_on_exit [bool]"
1037 Save all tabs, except the active, on exit? The last saved tabs are restored once
1038 when starting the next session. Multiple sessions are stored in a stack and the
1039 oldest saved tabs are restored first.
1040 .IP "scroll_offset [integer]" 4
1041 .IX Item "scroll_offset [integer]"
1042 Try to keep this much space between the top/bottom border when scrolling.
1043 .IP "shorten_title [integer]" 4
1044 .IX Item "shorten_title [integer]"
1045 Trim the title of the window if it gets long?  The number defines how many
1046 directories are displayed at once. A value of 0 turns off this feature.
1047 .IP "show_cursor [bool]" 4
1048 .IX Item "show_cursor [bool]"
1049 Always show the terminal cursor?
1050 .IP "show_hidden_bookmarks [bool]" 4
1051 .IX Item "show_hidden_bookmarks [bool]"
1052 Show dotfiles in the bookmark preview window? (Type ')
1053 .IP "show_hidden [bool] <zh>, <^H>" 4
1054 .IX Item "show_hidden [bool] <zh>, <^H>"
1055 Show hidden files?
1056 .IP "show_selection_in_titlebar [bool]" 4
1057 .IX Item "show_selection_in_titlebar [bool]"
1058 Add the highlighted file to the path in the titlebar
1059 .IP "sort_case_insensitive [bool] <zc>" 4
1060 .IX Item "sort_case_insensitive [bool] <zc>"
1061 Sort case-insensitively?  If true, \*(L"a\*(R" will be listed before \*(L"B\*(R" even though
1062 its \s-1ASCII\s0 value is higher.
1063 .IP "sort_directories_first [bool] <zd>" 4
1064 .IX Item "sort_directories_first [bool] <zd>"
1065 Sort directories first?
1066 .IP "sort_reverse [bool] <or>" 4
1067 .IX Item "sort_reverse [bool] <or>"
1068 Reverse the order of files?
1069 .IP "sort_unicode [bool]" 4
1070 .IX Item "sort_unicode [bool]"
1071 When sorting according to some string, should the unicode characters be
1072 compared, instead of looking at the raw character values to save time?
1073 .IP "sort [string] <oa>, <ob>, <oc>, <oe>, <om>, <on>, <ot>, <os>, <oz>" 4
1074 .IX Item "sort [string] <oa>, <ob>, <oc>, <oe>, <om>, <on>, <ot>, <os>, <oz>"
1075 Which sorting mechanism should be used?  Choose one of \fBatime\fR, \fBbasename\fR,
1076 \&\fBctime\fR, \fBextension\fR, \fBmtime\fR, \fBnatural\fR, \fBtype\fR, \fBsize\fR, \fBrandom\fR
1078 Note: You can reverse the order by typing an uppercase second letter in the key
1079 combination, e.g. \*(L"oN\*(R" to sort from Z to A.
1080 .IP "status_bar_on_top [bool]" 4
1081 .IX Item "status_bar_on_top [bool]"
1082 Put the status bar at the top of the window?
1083 .IP "tilde_in_titlebar [bool]" 4
1084 .IX Item "tilde_in_titlebar [bool]"
1085 Abbreviate \f(CW$HOME\fR with ~ in the titlebar (first line) of ranger?
1086 .IP "unicode_ellipsis [bool]" 4
1087 .IX Item "unicode_ellipsis [bool]"
1088 Use a unicode \*(L"...\*(R" character instead of \*(L"~\*(R" to mark cut-off filenames?
1089 .IP "bidi_support [bool]" 4
1090 .IX Item "bidi_support [bool]"
1091 Try to properly display file names in \s-1RTL\s0 languages (Hebrew, Arabic) by using
1092 a \s-1BIDI\s0 algorithm to reverse the relevant parts of the text.
1093 Requires the python-bidi pip package.
1094 .IP "update_title [bool]" 4
1095 .IX Item "update_title [bool]"
1096 Set a window title?
1097 .IP "update_tmux_title [bool]" 4
1098 .IX Item "update_tmux_title [bool]"
1099 Set the title to \*(L"ranger\*(R" in the tmux program?
1100 .IP "use_preview_script [bool] <zv>" 4
1101 .IX Item "use_preview_script [bool] <zv>"
1102 Use the preview script defined in the setting \fIpreview_script\fR?
1103 .IP "vcs_aware [bool]" 4
1104 .IX Item "vcs_aware [bool]"
1105 Gather and display data about version control systems. Supported vcs: git, hg.
1106 .IP "vcs_backend_git, vcs_backend_hg, vcs_backend_bzr, vcs_backend_svn [string]" 4
1107 .IX Item "vcs_backend_git, vcs_backend_hg, vcs_backend_bzr, vcs_backend_svn [string]"
1108 Sets the state for the version control backend. The possible values are:
1110 .Vb 3
1111 \& disabled   don\*(Aqt display any information.
1112 \& local      display only local state.
1113 \& enabled    display both, local and remote state. May be slow for hg and bzr.
1115 .IP "viewmode [string]" 4
1116 .IX Item "viewmode [string]"
1117 Sets the view mode, which can be \fBmiller\fR to display the files in the
1118 traditional miller column view that shows multiple levels of the hierarchy, or
1119 \&\fBmultipane\fR to use multiple panes (one per tab) similar to midnight-commander.
1120 .IP "w3m_delay [float]" 4
1121 .IX Item "w3m_delay [float]"
1122 Delay in seconds before displaying an image with the w3m method.
1123 Increase it in case of experiencing display corruption.
1124 .IP "w3m_offset [int]" 4
1125 .IX Item "w3m_offset [int]"
1126 Offset in pixels for the inner border of the terminal. Some terminals require
1127 the offset to be specified explicitly, among others st and UXterm, some don't
1128 like urxvt.
1129 .IP "wrap_scroll [bool]" 4
1130 .IX Item "wrap_scroll [bool]"
1131 Enable scroll wrapping \- moving down while on the last item will wrap around to
1132 the top and vice versa.
1133 .IP "xterm_alt_key [bool]" 4
1134 .IX Item "xterm_alt_key [bool]"
1135 Enable this if key combinations with the Alt Key don't work for you.
1136 (Especially on xterm)
1137 .SH "COMMANDS"
1138 .IX Header "COMMANDS"
1139 You can enter the commands in the console which is opened by pressing \*(L":\*(R".
1141 You can always get a list of the currently existing commands by typing \*(L"?c\*(R" in
1142 ranger.  For your convenience, this is a list of the \*(L"public\*(R" commands including their parameters, excluding descriptions:
1144 .Vb 10
1145 \& alias [newcommand] [oldcommand]
1146 \& bulkrename
1147 \& cd [path]
1148 \& chain command1[; command2[; command3...]]
1149 \& chmod octal_number
1150 \& cmap key command
1151 \& console [\-pSTARTPOSITION] command
1152 \& copycmap key newkey [newkey2...]
1153 \& copymap key newkey [newkey2...]
1154 \& copypmap key newkey [newkey2...]
1155 \& copytmap key newkey [newkey2...]
1156 \& cunmap keys...
1157 \& default_linemode [path=regexp | tag=tags] linemodename
1158 \& delete
1159 \& echo [text]
1160 \& edit [filename]
1161 \& eval [\-q] python_code
1162 \& filter [string]
1163 \& filter_inode_type [dfl]
1164 \& find pattern
1165 \& flat level
1166 \& grep pattern
1167 \& help
1168 \& jump_non [\-FLAGS...]
1169 \& linemode linemodename
1170 \& load_copy_buffer
1171 \& map key command
1172 \& mark pattern
1173 \& mark_tag [tags]
1174 \& meta key value
1175 \& mkdir dirname
1176 \& open_with [application] [flags] [mode]
1177 \& pmap key command
1178 \& prompt_metadata [key1 [key2 [...]]]
1179 \& punmap keys...
1180 \& quit
1181 \& quit!
1182 \& quitall
1183 \& quitall!
1184 \& relink newpath
1185 \& rename_append [\-FLAGS...]
1186 \& rename newname
1187 \& save_copy_buffer
1188 \& scout [\-FLAGS...] pattern
1189 \& search pattern
1190 \& search_inc pattern
1191 \& set option value
1192 \& setintag tags option value
1193 \& setlocal [path=<path>] option value
1194 \& shell [\-FLAGS...] command
1195 \& source filename
1196 \& terminal
1197 \& tmap key command
1198 \& touch filename
1199 \& travel pattern
1200 \& tunmap keys...
1201 \& unmap keys...
1202 \& unmark pattern
1203 \& unmark_tag [tags]
1206 There are additional commands which are directly translated to python
1207 functions, one for every method in the ranger.core.actions.Actions class.
1208 They are not documented here, since they are mostly for key bindings, not to be
1209 typed in by a user.  Read the source if you are interested in them.
1211 These are the public commands including their descriptions:
1212 .IP "alias [\fInewcommand\fR] [\fIoldcommand\fR]" 2
1213 .IX Item "alias [newcommand] [oldcommand]"
1214 Copies the oldcommand as newcommand.
1215 .IP "bulkrename" 2
1216 .IX Item "bulkrename"
1217 This command opens a list of selected files in an external editor.  After you
1218 edit and save the file, it will generate a shell script which does bulk
1219 renaming according to the changes you did in the file.
1221 This shell script is opened in an editor for you to review.  After you close
1222 it, it will be executed.
1223 .IP "cd [\fIpath\fR]" 2
1224 .IX Item "cd [path]"
1225 The cd command changes the directory.  If path is a file, selects that file.
1226 The command \f(CW\*(C`:cd \-\*(C'\fR is equivalent to typing ``.
1227 .IP "chain \fIcommand1\fR[; \fIcommand2\fR[; \fIcommand3\fR...]]" 2
1228 .IX Item "chain command1[; command2[; command3...]]"
1229 Combines multiple commands into one, separated by semicolons.
1230 .IP "chmod \fIoctal_number\fR" 2
1231 .IX Item "chmod octal_number"
1232 Sets the permissions of the selection to the octal number.
1234 The octal number is between 000 and 777. The digits specify the permissions for
1235 the user, the group and others.  A 1 permits execution, a 2 permits writing, a
1236 4 permits reading.  Add those numbers to combine them. So a 7 permits
1237 everything.
1239 Key bindings in the form of [\-+]<who><what> and <octal>= also exist.  For
1240 example, \fB+ar\fR allows reading for everyone, \-ow forbids others to write and
1241 777= allows everything.
1243 See also: man 1 chmod
1244 .IP "cmap \fIkey\fR \fIcommand\fR" 2
1245 .IX Item "cmap key command"
1246 Binds keys for the console. Works like the \f(CW\*(C`map\*(C'\fR command.
1247 .IP "console [\-p\fIN\fR] \fIcommand\fR" 2
1248 .IX Item "console [-pN] command"
1249 Opens the console with the command already typed in.  The cursor is placed at
1250 \&\fIN\fR.
1251 .IP "copycmap \fIkey\fR \fInewkey\fR [\fInewkey2\fR ...]" 2
1252 .IX Item "copycmap key newkey [newkey2 ...]"
1253 See \f(CW\*(C`copymap\*(C'\fR
1254 .IP "copymap \fIkey\fR \fInewkey\fR [\fInewkey2\fR ...]" 2
1255 .IX Item "copymap key newkey [newkey2 ...]"
1256 Copies the keybinding \fIkey\fR to \fInewkey\fR in the \*(L"browser\*(R" context.  This is a
1257 deep copy, so if you change the new binding (or parts of it) later, the old one
1258 is not modified.
1260 To copy key bindings of the console, taskview, or pager use \*(L"copycmap\*(R",
1261 \&\*(L"copytmap\*(R" or \*(L"copypmap\*(R".
1262 .IP "copypmap \fIkey\fR \fInewkey\fR [\fInewkey2\fR ...]" 2
1263 .IX Item "copypmap key newkey [newkey2 ...]"
1264 See \f(CW\*(C`copymap\*(C'\fR
1265 .IP "copytmap \fIkey\fR \fInewkey\fR [\fInewkey2\fR ...]" 2
1266 .IX Item "copytmap key newkey [newkey2 ...]"
1267 See \f(CW\*(C`copymap\*(C'\fR
1268 .IP "cunmap [\fIkeys...\fR]" 2
1269 .IX Item "cunmap [keys...]"
1270 Removes key mappings of the console. Works like the \f(CW\*(C`unmap\*(C'\fR command.
1271 .IP "default_linemode [\fIpath=regexp\fR | \fItag=tags\fR] \fIlinemodename\fR" 2
1272 .IX Item "default_linemode [path=regexp | tag=tags] linemodename"
1273 Sets the default linemode.  See \fIlinemode\fR command.
1275 Examples:
1277 Set the global default linemode to \*(L"permissions\*(R":
1278  :default_linemode permissions
1280 Set the default linemode to \*(L"permissions\*(R" for all files tagged with \*(L"p\*(R" or \*(L"P\*(R":
1281  :default_linemode tag=pP permissions
1283 Set the default linemode for all files in ~/books/ to \*(L"metatitle\*(R":
1284  :default_linemode path=/home/.*?/books/.* metatitle
1285 .IP "delete" 2
1286 .IX Item "delete"
1287 Destroy all files in the selection with a roundhouse kick.  ranger will ask for
1288 a confirmation if you attempt to delete multiple (marked) files or non-empty
1289 directories.  This can be changed by modifying the setting \*(L"confirm_on_delete\*(R".
1290 .IP "echo \fItext\fR" 2
1291 .IX Item "echo text"
1292 Display the text in the statusbar.
1293 .IP "edit [\fIfilename\fR]" 2
1294 .IX Item "edit [filename]"
1295 Edit the current file or the file in the argument.
1296 .IP "eval [\fI\-q\fR] \fIpython_code\fR" 2
1297 .IX Item "eval [-q] python_code"
1298 Evaluates the python code.  `fm' is a reference to the \s-1FM\s0 instance.  To display
1299 text, use the function `p'.  The result is displayed on the screen unless you
1300 use the \*(L"\-q\*(R" option.
1302 Examples:
1303  :eval fm
1304  :eval len(fm.tabs)
1305  :eval p(\*(L"Hello World!\*(R")
1306 .IP "filter [\fIstring\fR]" 2
1307 .IX Item "filter [string]"
1308 Displays only the files which contain the \fIstring\fR in their basename.  Running
1309 this command without any parameter will reset the filter.
1311 This command is based on the \fIscout\fR command and supports all of its options.
1312 .IP "filter_inode_type [dfl]" 2
1313 .IX Item "filter_inode_type [dfl]"
1314 Displays only the files of specified inode type. To display only directories,
1315 use the 'd' parameter. To display only files, use the 'f' parameter. To display
1316 only links, use the 'l' parameter. Parameters can be combined. To remove this
1317 filter, use no parameter.
1318 .IP "find \fIpattern\fR" 2
1319 .IX Item "find pattern"
1320 Search files in the current directory that contain the given (case-insensitive)
1321 string in their name as you type.  Once there is an unambiguous result, it will
1322 be run immediately. (Or entered, if it's a directory.)
1324 This command is based on the \fIscout\fR command and supports all of its options.
1325 .IP "flat level" 2
1326 .IX Item "flat level"
1327 Flattens the directory view up to the specified level. Level \-1 means infinite
1328 level. Level 0 means standard view without flattened directory view. Level
1329 values \-2 and less are invalid.
1330 .IP "grep \fIpattern\fR" 2
1331 .IX Item "grep pattern"
1332 Looks for a string in all marked files or directories.
1333 .IP "help" 2
1334 .IX Item "help"
1335 Provides a quick way to view ranger documentations.
1336 .IP "jump_non [\-\fIflags\fR...]" 2
1337 .IX Item "jump_non [-flags...]"
1338 Jumps to first non-directory if highlighted file is a directory and vice versa.
1340 Flags:
1341  \-r    Jump in reverse order
1342  \-w    Wrap around if reaching end of filelist
1343 .IP "linemode \fIlinemodename\fR" 2
1344 .IX Item "linemode linemodename"
1345 Sets the linemode of all files in the current directory.  The linemode may be:
1347 .Vb 10
1348 \& "filename":
1349 \&   display each line as "<basename>...<size>"
1350 \& "fileinfo":
1351 \&   display each line as "<basename>...<file(1) output>"
1352 \& "mtime":
1353 \&   display each line as "<basename>...<mtime>" in ISO format
1354 \& "humanreadablemtime":
1355 \&   display each line as "<basename>...<mtime>" in a human readable
1356 \&   format, more precise the more recent.
1357 \& "sizemtime":
1358 \&   display each line as "<basename>...<size> <mtime>" in ISO format
1359 \& "humanreadablesizemtime":
1360 \&   display each line as "<basename>...<size> <mtime>" in a human
1361 \&   readable format, more precise the more recent.
1362 \& "permissions":
1363 \&   display each line as "<permissions> <owner> <group> <basename>"
1364 \& "metatitle":
1365 \&   display metadata from .metadata.json files if available, fall back
1366 \&   to the "filename" linemode if no metadata was found.
1367 \&   See :meta command.
1370 The custom linemodes may be added by subclassing the \fILinemodeBase\fR class.
1371 See the \fIranger.core.linemode\fR module for some examples.
1372 .IP "load_copy_buffer" 2
1373 .IX Item "load_copy_buffer"
1374 Load the copy buffer from \fI~/.config/ranger/copy_buffer\fR.  This can be used to
1375 pass the list of copied files to another ranger instance.
1376 .IP "map \fIkey\fR \fIcommand\fR" 2
1377 .IX Item "map key command"
1378 Assign the key combination to the given command.  Whenever you type the
1379 key/keys, the command will be executed.  Additionally, if you use a quantifier
1380 when typing the key, like 5j, it will be passed to the command as the attribute
1381 \&\*(L"self.quantifier\*(R".
1383 The keys you bind with this command are accessible in the file browser only,
1384 not in the console, task view or pager.  To bind keys there, use the commands
1385 \&\*(L"cmap\*(R", \*(L"tmap\*(R" or \*(L"pmap\*(R".
1386 .IP "mark \fIpattern\fR" 2
1387 .IX Item "mark pattern"
1388 Mark all files matching the regular expression pattern.
1390 This command is based on the \fIscout\fR command and supports all of its options.
1391 .IP "mark_tag [\fItags\fR]" 2
1392 .IX Item "mark_tag [tags]"
1393 Mark all tags that are tagged with either of the given tags.  When leaving out
1394 the tag argument, all tagged files are marked.
1395 .IP "meta \fIkey\fR \fIvalue\fR" 2
1396 .IX Item "meta key value"
1397 Set the metadata of the currently highlighted file.  Example:
1399 .Vb 2
1400 \& :meta title The Hitchhiker\*(Aqs Guide to the Galaxy
1401 \& :meta year 1979
1404 This metadata can be displayed by, for example, using the \*(L"metatitle\*(R" line mode
1405 by typing Mt.
1406 .IP "mkdir \fIdirname\fR" 2
1407 .IX Item "mkdir dirname"
1408 Creates a directory with the name \fIdirname\fR.
1409 .IP "open_with [\fIapplication\fR] [\fIflags\fR] [\fImode\fR]" 2
1410 .IX Item "open_with [application] [flags] [mode]"
1411 Open the selected files with the given application, unless it is omitted, in
1412 which case the default application is used.  \fIflags\fR change the way the
1413 application is executed and are described in their own section in this man
1414 page.  The \fImode\fR is a number that specifies which application to use.  The list
1415 of applications is generated by the external file opener \*(L"rifle\*(R" and can be
1416 displayed when pressing \*(L"r\*(R" in ranger.
1418 Note that if you specify an application, the mode is ignored.
1419 .IP "pmap \fIkey\fR \fIcommand\fR" 2
1420 .IX Item "pmap key command"
1421 Binds keys for the pager. Works like the \f(CW\*(C`map\*(C'\fR command.
1422 .IP "prompt_metadata [\fIkeys ...\fR]" 2
1423 .IX Item "prompt_metadata [keys ...]"
1424 Prompt the user to input metadata with the \f(CW\*(C`meta\*(C'\fR command for multiple keys in
1425 a row.
1426 .IP "punmap [\fIkeys ...\fR]" 2
1427 .IX Item "punmap [keys ...]"
1428 Removes key mappings of the pager. Works like the \f(CW\*(C`unmap\*(C'\fR command.
1429 .IP "quit" 2
1430 .IX Item "quit"
1431 Closes the current tab, if there's only one tab. Otherwise quits if there are no tasks in progress.
1432 The current directory will be bookmarked as ' so you can re-enter it by typing `` or '' the next time you
1433 start ranger.
1434 .IP "quit!" 2
1435 .IX Item "quit!"
1436 Like \f(CW\*(C`quit\*(C'\fR, except will force quit even if tasks are in progress.
1437 .IP "quitall" 2
1438 .IX Item "quitall"
1439 Like \f(CW\*(C`quit\*(C'\fR, except will quit even if multiple tabs are open.
1440 .IP "quitall!" 2
1441 .IX Item "quitall!"
1442 Like \f(CW\*(C`quitall\*(C'\fR, except will force quit even if tasks are in progress.
1443 .IP "relink \fInewpath\fR" 2
1444 .IX Item "relink newpath"
1445 Change the link destination of the current symlink file to <newpath>. First
1446 <tab> will load the original link.
1447 .IP "rename \fInewname\fR" 2
1448 .IX Item "rename newname"
1449 Rename the current file.  If a file with that name already exists, the renaming
1450 will fail.  Also try the key binding A for appending something to a file name.
1451 .IP "rename_append [\-\fIflags\fR...]" 2
1452 .IX Item "rename_append [-flags...]"
1453 Opens the console with \*(L":rename <current file>\*(R" with the cursor positioned
1454 before the file extension.
1456 Flags:
1457  \-a    Position before all extensions
1458  \-r    Remove everything before extensions
1459 .IP "save_copy_buffer" 2
1460 .IX Item "save_copy_buffer"
1461 Save the copy buffer to \fI~/.config/ranger/copy_buffer\fR.  This can be used to
1462 pass the list of copied files to another ranger instance.
1463 .IP "scout [\-\fIflags\fR...] [\-\-] \fIpattern\fR" 2
1464 .IX Item "scout [-flags...] [--] pattern"
1465 Swiss army knife command for searching, traveling and filtering files.
1467 Flags:
1468  \-a    Automatically open a file on unambiguous match
1469  \-e    Open the selected file when pressing enter
1470  \-f    Filter files that match the current search pattern
1471  \-g    Interpret pattern as a glob pattern
1472  \-i    Ignore the letter case of the files
1473  \-k    Keep the console open when changing a directory with the command
1474  \-l    Letter skipping; e.g. allow \*(L"rdme\*(R" to match the file \*(L"readme\*(R"
1475  \-m    Mark the matching files after pressing enter
1476  \-M    Unmark the matching files after pressing enter
1477  \-p    Permanent filter: hide non-matching files after pressing enter
1478  \-r    Interpret pattern as a regular expression pattern
1479  \-s    Smart case; like \-i unless pattern contains upper case letters
1480  \-t    Apply filter and search pattern as you type
1481  \-v    Inverts the match
1483 Multiple flags can be combined.  For example, \*(L":scout \-gpt\*(R" would create
1484 a :filter\-like command using globbing.
1485 .IP "search \fIpattern\fR" 2
1486 .IX Item "search pattern"
1487 Search files in the current directory that match the given (case insensitive)
1488 regular expression pattern.
1490 This command is based on the \fIscout\fR command and supports all of its options.
1491 .IP "search_inc \fIpattern\fR" 2
1492 .IX Item "search_inc pattern"
1493 Search files in the current directory that match the given (case insensitive)
1494 regular expression pattern.  This command gets you to matching files as you
1495 type.
1497 This command is based on the \fIscout\fR command and supports all of its options.
1498 .IP "set \fIoption\fR \fIvalue\fR" 2
1499 .IX Item "set option value"
1500 Assigns a new value to an option.  Valid options are listed in the settings
1501 section.  Use tab completion to get the current value of an option, though this
1502 doesn't work for functions and regular expressions. Valid values are:
1504 .Vb 7
1505 \& setting type   | example values
1506 \& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
1507 \& bool           | true, false
1508 \& integer        | 1, 23, 1337
1509 \& string         | foo, hello world
1510 \& list           | 1,2,3,4
1511 \& none           | none
1513 .IP "setintag \fItags\fR \fIoption\fR \fIvalue\fR" 2
1514 .IX Item "setintag tags option value"
1515 Assigns a new value to an option, but locally for the directories that are
1516 marked with \fItag\fR.  This means, that this option only takes effect when
1517 visiting that directory.
1519 For example, to change the sorting order in your downloads directory, tag it
1520 with the \fIv\fR tag by typing \fI"v\fR, then use this command:
1522 .Vb 1
1523 \& setintag v sort ctime
1525 .IP "setlocal [path=\fIpath\fR] \fIoption\fR \fIvalue\fR" 2
1526 .IX Item "setlocal [path=path] option value"
1527 Assigns a new value to an option, but locally for the directory given by
1528 \&\fIpath\fR. This means, that this option only takes effect when visiting that
1529 directory. If no path is given, uses the current directory.
1531 \&\fIpath\fR is a regular expression.  This means that \f(CW\*(C`path=~/dl\*(C'\fR applies to all
1532 paths that start with \fI~/dl\fR, e.g. \fI~/dl2\fR and \fI~/dl/foo\fR. To avoid this,
1533 use \f(CW\*(C`path=~/dl$\*(C'\fR.
1535 \&\fIpath\fR can be quoted with either single or double quotes to prevent unwanted
1536 splitting. \fIpath='~/dl dl$'\fR or \fIpath=\*(L"~/dl dl$\*(R"\fR
1537 .IP "shell [\-\fIflags\fR] \fIcommand\fR" 2
1538 .IX Item "shell [-flags] command"
1539 Run a shell command.  \fIflags\fR are discussed in their own section.
1540 .IP "source \fIfilename\fR" 2
1541 .IX Item "source filename"
1542 Reads commands from a file and executes them in the ranger console.
1544 This can be used to re-evaluate the rc.conf file after changing it:
1546 .Vb 1
1547 \& map X chain shell vim \-p %confdir/rc.conf %rangerdir/config/rc.conf; source %confdir/rc.conf
1549 .IP "scroll_preview \fIvalue\fR" 2
1550 .IX Item "scroll_preview value"
1551 Scroll the file preview by \fIvalue\fR lines.
1552 .IP "terminal" 2
1553 .IX Item "terminal"
1554 Spawns the \fIx\-terminal-emulator\fR starting in the current directory.
1555 .IP "tmap \fIkey\fR \fIcommand\fR" 2
1556 .IX Item "tmap key command"
1557 Binds keys for the taskview. Works like the \f(CW\*(C`map\*(C'\fR command.
1558 .IP "touch \fIfilename\fR" 2
1559 .IX Item "touch filename"
1560 Creates an empty file with the name \fIfilename\fR, unless it already exists.
1561 .IP "travel \fIpattern\fR" 2
1562 .IX Item "travel pattern"
1563 Filters the current directory for files containing the letters in the
1564 string, possibly with other letters in between.  The filter is applied as
1565 you type.  When only one directory is left, it is entered and the console
1566 is automatically reopened, allowing for fast travel.
1567 To close the console, press \s-1ESC\s0 or execute a file.
1569 This command is based on the \fIscout\fR command and supports all of its options.
1570 .IP "tunmap [\fIkeys ...\fR]" 2
1571 .IX Item "tunmap [keys ...]"
1572 Removes key mappings of the taskview. Works like the \f(CW\*(C`unmap\*(C'\fR command.
1573 .IP "unmap [\fIkeys\fR ...]" 2
1574 .IX Item "unmap [keys ...]"
1575 Removes the given key mappings in the \*(L"browser\*(R" context.  To unmap key bindings
1576 in the console, taskview, or pager use \*(L"cunmap\*(R", \*(L"tunmap\*(R" or \*(L"punmap\*(R".
1577 .IP "unmark \fIpattern\fR" 2
1578 .IX Item "unmark pattern"
1579 Unmark all files matching a regular expression pattern.
1581 This command is based on the \fIscout\fR command and supports all of its options.
1582 .IP "unmark_tag [\fItags\fR]" 2
1583 .IX Item "unmark_tag [tags]"
1584 Unmark all tags that are tagged with either of the given tags.  When leaving
1585 out the tag argument, all tagged files are unmarked.
1586 .SH "FILES"
1587 .IX Header "FILES"
1588 ranger reads several configuration files which are located in
1589 \&\fI\f(CI$HOME\fI/.config/ranger\fR or \fI\f(CI$XDG_CONFIG_HOME\fI/ranger\fR if \f(CW$XDG_CONFIG_HOME\fR is
1590 defined.  You can use the \-\-copy\-config option to obtain the default
1591 configuration files.  The files contain further documentation.
1593 \&\fIrc.conf\fR, \fIcommands.py\fR and \fIcolorschemes\fR do not need to be copied fully
1594 as they will only be adding to the default configuration files except if explicitly
1595 overridden. This may lead to some confusing situations, for example when a key is
1596 being bound despite the corresponding line being removed from the user's copy of
1597 the configuration file. This behavior may be disabled with an environment
1598 variable (see also: \fB\s-1ENVIRONMENT\s0\fR). Note: All other configuration files only
1599 read from one source; i.e. default \s-1OR\s0 user, not both.
1600 \&\fIrc.conf\fR and \fIcommands.py\fR are additionally read from \fI/etc/ranger\fR if they
1601 exist for system-wide configuration, user configuration overrides system
1602 configuration which overrides the default configuration.
1604 When starting ranger with the \fB\-\-clean\fR option, it will not access or create
1605 any of these files.
1606 .SS "\s-1CONFIGURATION\s0"
1607 .IX Subsection "CONFIGURATION"
1608 .IP "rc.conf" 10
1609 .IX Item "rc.conf"
1610 Contains a list of commands which are executed on startup.  Mostly key bindings
1611 and settings are defined here.
1612 .IP "commands.py" 10
1613 .IX Item "commands.py"
1614 A python module that defines commands which can be used in ranger's console by
1615 typing \*(L":\*(R" or in the rc.conf file.  Note that you can define commands in the
1616 same manner within plugins.
1617 .IP "commands_full.py" 10
1618 .IX Item "commands_full.py"
1619 This file is copied by \-\-copy\-config=commands_full and serves as a reference
1620 for custom commands.  It is entirely ignored by ranger.
1621 .IP "rifle.conf" 10
1622 .IX Item "rifle.conf"
1623 This is the configuration file for the built-in file launcher called \*(L"rifle\*(R".
1624 .IP "scope.sh" 10
1625 .IX Item "scope.sh"
1626 This is a script that handles file previews.  When the options
1627 \&\fIuse_preview_script\fR and \fIpreview_files\fR are set, the program specified in
1628 the option \fIpreview_script\fR is run and its output and/or exit code determines
1629 rangers reaction.
1630 .IP "colorschemes/" 10
1631 .IX Item "colorschemes/"
1632 Colorschemes can be placed here.
1633 .IP "plugins/" 10
1634 .IX Item "plugins/"
1635 Plugins can be placed here.
1636 .SS "\s-1STORAGE\s0"
1637 .IX Subsection "STORAGE"
1638 .IP "bookmarks" 10
1639 .IX Item "bookmarks"
1640 This file contains a list of bookmarks.  The syntax is /^(.):(.*)$/. The first
1641 character is the bookmark key and the rest after the colon is the path to the
1642 file.  In ranger, bookmarks can be set by typing m<key>, accessed by typing
1643 \&'<key> and deleted by typing um<key>.
1644 .IP "copy_buffer" 10
1645 .IX Item "copy_buffer"
1646 When running the command :save_copy_buffer, the paths of all currently copied
1647 files are saved in this file.  You can later run :load_copy_buffer to copy the
1648 same files again, pass them to another ranger instance or process them in a
1649 script.
1650 .IP "history" 10
1651 .IX Item "history"
1652 Contains a list of commands that have been previously typed in.
1653 .IP "tagged" 10
1654 .IX Item "tagged"
1655 Contains a list of tagged files. The syntax is /^(.:)?(.*)$/ where the first
1656 letter is the optional name of the tag and the rest after the optional colon is
1657 the path to the file.  In ranger, tags can be set by pressing t and removed
1658 with T.  To assign a named tag, type "<tagname>.
1659 .SH "ENVIRONMENT"
1660 .IX Header "ENVIRONMENT"
1661 These environment variables have an effect on ranger:
1662 .IP "\s-1RANGER_LEVEL\s0" 8
1663 .IX Item "RANGER_LEVEL"
1664 ranger sets this environment variable to \*(L"1\*(R" or increments it if it already
1665 exists.  External programs can determine whether they were spawned from ranger
1666 by checking for this variable.
1667 .IP "\s-1RANGER_LOAD_DEFAULT_RC\s0" 8
1668 .IX Item "RANGER_LOAD_DEFAULT_RC"
1669 If this variable is set to \s-1FALSE,\s0 ranger will not load the default rc.conf.
1670 This can save time if you copied the whole rc.conf to \fI~/.config/ranger/\fR and
1671 don't need the default one at all.
1672 .IP "\s-1VISUAL\s0" 8
1673 .IX Item "VISUAL"
1674 Defines the editor to be used for the \*(L"E\*(R" key.  Falls back to \s-1EDITOR\s0 if
1675 undefined or empty.
1676 .IP "\s-1EDITOR\s0" 8
1677 .IX Item "EDITOR"
1678 Defines the editor to be used for the \*(L"E\*(R" key if \s-1VISUAL\s0 is undefined or empty.
1679 Defaults to \*(L"vim\*(R".
1680 .IP "\s-1SHELL\s0" 8
1681 .IX Item "SHELL"
1682 Defines the shell that ranger is going to use with the :shell command and
1683 the \*(L"S\*(R" key.  Defaults to \*(L"/bin/sh\*(R".
1684 .IP "\s-1TERMCMD\s0" 8
1685 .IX Item "TERMCMD"
1686 Defines the terminal emulator command that ranger is going to use with the
1687 :terminal command and the \*(L"t\*(R" run flag.  Defaults to \*(L"xterm\*(R".
1688 .IP "\s-1PYGMENTIZE_STYLE\s0" 8
1689 .IX Item "PYGMENTIZE_STYLE"
1690 Specifies the theme to be used for syntax highlighting when \fIpygmentize\fR is
1691 installed, unless \fIhighlight\fR is also installed. Find out possible values by
1692 running:
1693  python \-c 'import pygments.styles; [print(stl) for stl in
1694  pygments.styles.\fIget_all_styles()\fR]'
1695 .IP "\s-1HIGHLIGHT_STYLE\s0" 8
1696 .IX Item "HIGHLIGHT_STYLE"
1697 Specifies the theme to be used for syntax highlighting when \fIhighlight\fR is
1698 installed. Find out possible values by running \f(CW\*(C`highlight \-\-list\-themes\*(C'\fR.
1699 .IP "\s-1HIGHLIGHT_TABWIDTH\s0" 8
1700 .IX Item "HIGHLIGHT_TABWIDTH"
1701 Specifies the number of spaces to use to replace tabs in \fIhighlight\fRed files.
1702 .IP "\s-1HIGHLIGHT_OPTIONS\s0" 8
1703 .IX Item "HIGHLIGHT_OPTIONS"
1704 \&\fIhighlight\fR will pick up command line options specified in this variable. A
1705 \&\f(CW\*(C`\-\-style=\*(C'\fR option specified here will override \f(CW\*(C`HIGHLIGHT_STYLE\*(C'\fR. Similarly,
1706 \&\f(CW\*(C`\-\-replace\-tabs=\*(C'\fR will override \f(CW\*(C`HIGHLIGHT_TABWIDTH\*(C'\fR.
1707 .IP "\s-1XDG_CONFIG_HOME\s0" 8
1708 .IX Item "XDG_CONFIG_HOME"
1709 Specifies the directory for configuration files. Defaults to \fI\f(CI$HOME\fI/.config\fR.
1710 .IP "\s-1PYTHONOPTIMIZE\s0" 8
1711 .IX Item "PYTHONOPTIMIZE"
1712 This variable determines the optimize level of python.
1714 Using PYTHONOPTIMIZE=1 (like python \-O) will make python discard assertion
1715 statements.  You will gain efficiency at the cost of losing some debug info.
1717 Using PYTHONOPTIMIZE=2 (like python \-OO) will additionally discard any
1718 docstrings.  Using this will disable the <F1> key on commands.
1719 .IP "W3MIMGDISPLAY_PATH" 8
1720 .IX Item "W3MIMGDISPLAY_PATH"
1721 By changing this variable, you can change the path of the executable file for
1722 image previews.  By default, it is set to \fI/usr/lib/w3m/w3mimgdisplay\fR.
1723 .SH "EXAMPLES"
1724 .IX Header "EXAMPLES"
1725 There are various examples on how to extend ranger with plugins or combine
1726 ranger with other programs.  These can be found in the
1727 \&\fI/usr/share/doc/ranger/examples/\fR directory, or the \fIdoc/ranger/\fR that is
1728 provided along with the source code.
1729 .SH "LICENSE"
1730 .IX Header "LICENSE"
1731 \&\s-1GNU\s0 General Public License 3 or (at your option) any later version.
1732 .SH "LINKS"
1733 .IX Header "LINKS"
1734 .IP "Download: <https://ranger.github.io/ranger\-stable.tar.gz>" 4
1735 .IX Item "Download: <https://ranger.github.io/ranger-stable.tar.gz>"
1736 .PD 0
1737 .IP "The project page: <https://ranger.github.io/>" 4
1738 .IX Item "The project page: <https://ranger.github.io/>"
1739 .IP "The mailing list: <https://savannah.nongnu.org/mail/?group=ranger>" 4
1740 .IX Item "The mailing list: <https://savannah.nongnu.org/mail/?group=ranger>"
1741 .IP "\s-1IRC\s0 channel: #ranger on freenode.net" 4
1742 .IX Item "IRC channel: #ranger on freenode.net"
1745 ranger is maintained with the git version control system.  To fetch a fresh
1746 copy, run:
1748 .Vb 1
1749 \& git clone git@github.com:ranger/ranger.git
1751 .SH "SEE ALSO"
1752 .IX Header "SEE ALSO"
1753 \&\fIrifle\fR\|(1)
1754 .SH "BUGS"
1755 .IX Header "BUGS"
1756 Report bugs here: <https://github.com/ranger/ranger/issues>
1758 Please include as much relevant information as possible.  For the most
1759 diagnostic output, run ranger like this: \f(CW\*(C`PYTHONOPTIMIZE= ranger \-\-debug\*(C'\fR