]> git.rmz.io Git - dotfiles.git/blob - ranger/rc.conf
nvim: add FPP copyright snippet
[dotfiles.git] / ranger / rc.conf
1 # ===================================================================
2 # This file contains the default startup commands for ranger.
3 # To change them, it is recommended to create the file
4 # ~/.config/ranger/rc.conf and add your custom commands there.
5 #
6 # If you copy this whole file there, you may want to set the environment
7 # variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
8 #
9 # The purpose of this file is mainly to define keybindings and settings.
10 # For running more complex python code, please create a plugin in "plugins/" or
11 # a command in "commands.py".
12 #
13 # Each line is a command that will be run before the user interface
14 # is initialized. As a result, you can not use commands which rely
15 # on the UI such as :delete or :mark.
16 # ===================================================================
17
18 # ===================================================================
19 # == Options
20 # ===================================================================
21
22 # How many columns are there, and what are their relative widths?
23 #set column_ratios 1,3,4
24
25 # Which files should be hidden? (regular expression)
26 set hidden_filter ^\.|^lost\+found$
27
28 # Show hidden files? You can toggle this by typing 'zh'
29 #set show_hidden false
30
31 # Ask for a confirmation when running the "delete" command?
32 # Valid values are "always" (default), "never", "multiple"
33 # With "multiple", ranger will ask only if you delete multiple files at once.
34 set confirm_on_delete multiple
35
36 # Which script is used to generate file previews?
37 # ranger ships with scope.sh, a script that calls external programs (see
38 # README for dependencies) to preview images, archives, etc.
39 set preview_script ~/.config/ranger/scope.sh
40
41 # Use the external preview script or display simple plain text previews?
42 set use_preview_script true
43
44 # Open all images in this directory when running certain image viewers
45 # like feh or sxiv? You can still open selected files by marking them.
46 set open_all_images true
47
48 # Be aware of version control systems and display information.
49 set vcs_aware true
50
51 # State of the three backends git, hg, bzr. The possible states are
52 # disabled, local (only show local info), enabled (show local and remote
53 # information).
54 #set vcs_backend_git enabled
55 #set vcs_backend_hg disabled
56 #set vcs_backend_bzr disabled
57
58 # Preview images in full color with the external command "w3mimgpreview"?
59 # This requires the console web browser "w3m" and a supported terminal.
60 # It has been successfully tested with "xterm" and "urxvt" without tmux.
61 # Does not work in urxvt with 32bit colordepth, tradeoff between preview
62 # and transparency.
63 set preview_images true
64 set preview_images_method ueberzug
65
66 # Use a unicode "..." character to mark cut-off filenames?
67 set unicode_ellipsis true
68
69 # Show dotfiles in the bookmark preview box?
70 #set show_hidden_bookmarks true
71
72 # Which colorscheme to use? These colorschemes are available by default:
73 # default, jungle, snow
74 set colorscheme custom
75
76 # Preview files on the rightmost column?
77 # And collapse (shrink) the last column if there is nothing to preview?
78 #set preview_files true
79 #set preview_directories true
80 #set collapse_preview true
81
82 # Save the console history on exit?
83 #set save_console_history true
84
85 # Draw the status bar on top of the browser window (default: bottom)
86 #set status_bar_on_top false
87
88 # Draw a progress bar in the status bar which displays the average state of all
89 # currently running tasks which support progress bars?
90 #set draw_progress_bar_in_status_bar true
91
92 # Draw borders around columns?
93 set draw_borders true
94
95 # Display the directory name in tabs?
96 set dirname_in_tabs true
97
98 # Enable the mouse support?
99 #set mouse_enabled true
100
101 # Display the file size in the main column or status bar?
102 #set display_size_in_main_column true
103 #set display_size_in_status_bar true
104
105 # Display files tags in all columns or only in main column?
106 #set display_tags_in_all_columns true
107
108 # Set a title for the window?
109 set update_title true
110
111 # Set the title to "ranger" in the tmux program?
112 #set update_tmux_title false
113
114 # Shorten the title if it gets long? The number defines how many
115 # directories are displayed at once, 0 turns off this feature.
116 #set shorten_title 3
117
118 # Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
119 set tilde_in_titlebar true
120
121 # How many directory-changes or console-commands should be kept in history?
122 set max_history_size 2000
123 set max_console_history_size 5000
124
125 # Try to keep so much space between the top/bottom border when scrolling:
126 #set scroll_offset 8
127
128 # Flush the input after each key hit? (Noticable when ranger lags)
129 #set flushinput true
130
131 # Padding on the right when there's no preview?
132 # This allows you to click into the space to run the file.
133 set padding_right false
134
135 # Save bookmarks (used with mX and `X) instantly?
136 # This helps to synchronize bookmarks between multiple ranger
137 # instances but leads to *slight* performance loss.
138 # When false, bookmarks are saved when ranger is exited.
139 #set autosave_bookmarks true
140
141 # You can display the "real" cumulative size of directories by using the
142 # command :get_cumulative_size or typing "dc". The size is expensive to
143 # calculate and will not be updated automatically. You can choose
144 # to update it automatically though by turning on this option:
145 set autoupdate_cumulative_size false
146
147 # Turning this on makes sense for screen readers:
148 #set show_cursor false
149
150 # One of: size, basename, mtime, type
151 #set sort natural
152
153 # Additional sorting options
154 #set sort_reverse false
155 #set sort_case_insensitive true
156 set sort_directories_first false
157
158 # Enable this if key combinations with the Alt Key don't work for you.
159 # (Especially on xterm)
160 #set xterm_alt_key false
161
162 # ===================================================================
163 # == Local Options
164 # ===================================================================
165 # You can set local options that only affect a single directory.
166
167 # Examples:
168 setlocal path=~/downloads sort mtime
169 setlocal path=/mnt/fook/pictures/ sort mtime
170
171 # ===================================================================
172 # == Command Aliases in the Console
173 # ===================================================================
174
175 #alias e edit
176 #alias q quit
177 #alias q! quitall
178 #alias qall quitall
179 #alias setl setlocal
180
181 #alias filter scout -prt
182 #alias find scout -aet
183 #alias mark scout -mr
184 #alias unmark scout -Mr
185 #alias search scout -rs
186 #alias search_inc scout -rts
187 #alias travel scout -aefiklst
188
189 # ===================================================================
190 # == Define keys for the browser
191 # ===================================================================
192
193 # Basic
194 #map Q quit!
195 #map q quit
196 #copymap q ZZ ZQ
197
198 #map R reload_cwd
199 #map <C-r> reset
200 #map <C-l> redraw_window
201 #map <C-c> abort
202 #map <esc> change_mode normal
203
204 #map i display_file
205 #map ? help
206 #map W display_log
207 #map w taskview_open
208 #map S shell $SHELL
209
210 #map : console
211 #map ; console
212 #map ! console shell
213 #map @ console -p6 shell %%s
214 #map # console shell -p
215 #map s console shell
216 #map r chain draw_possible_programs; console open_with
217 #map f console find
218 #map cd console cd
219
220 # Tagging / Marking
221 #map t tag_toggle
222 #map ut tag_remove
223 #map "<any> tag_toggle tag=%any
224 #map <Space> mark_files toggle=True
225 #map v mark_files all=True toggle=True
226 #map uv mark_files all=True val=False
227 #map V toggle_visual_mode
228 #map uV toggle_visual_mode reverse=True
229
230 # For the nostalgics: Midnight Commander bindings
231 #map <F1> help
232 #map <F3> display_file
233 #map <F4> edit
234 #map <F5> copy
235 #map <F6> cut
236 #map <F7> console mkdir
237 #map <F8> console delete
238 #map <F10> exit
239
240 # In case you work on a keyboard with dvorak layout
241 #map <UP> move up=1
242 #map <DOWN> move down=1
243 #map <LEFT> move left=1
244 #map <RIGHT> move right=1
245 #map <HOME> move to=0
246 #map <END> move to=-1
247 #map <PAGEDOWN> move down=1 pages=True
248 #map <PAGEUP> move up=1 pages=True
249 #map <CR> move right=1
250 #map <DELETE> console delete
251 #map <INSERT> console touch
252
253 # VIM-like
254 #copymap <UP> k
255 #copymap <DOWN> j
256 #copymap <LEFT> h
257 #copymap <RIGHT> l
258 #copymap <HOME> gg
259 #copymap <END> G
260 #copymap <PAGEDOWN> <C-F>
261 #copymap <PAGEUP> <C-B>
262
263 #map J move down=0.5 pages=True
264 #map K move up=0.5 pages=True
265 #copymap J <C-D>
266 #copymap K <C-U>
267
268 # Jumping around
269 #map H history_go -1
270 #map L history_go 1
271 #map ] move_parent 1
272 #map [ move_parent -1
273 #map } traverse
274
275 #map gh cd ~
276 #map ge cd /etc
277 #map gu cd /usr
278 #map gd cd /dev
279 #map gl cd -r .
280 #map gL cd -r %f
281 #map go cd /opt
282 #map gv cd /var
283 #map gm cd /media
284 #map gM cd /mnt
285 #map gs cd /srv
286 #map gr cd /
287 #map gR eval fm.cd(ranger.RANGERDIR)
288 #map g/ cd /
289 #map g? cd /usr/share/doc/ranger
290
291 # External Programs
292 #map E edit
293 #map du shell -p du --max-depth=1 -h --apparent-size
294 #map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
295 #map yp shell -d echo -n %d/%f | xsel -i
296 #map yd shell -d echo -n %d | xsel -i
297 #map yn shell -d echo -n %f | xsel -i
298
299 # Filesystem Operations
300 #map = chmod
301
302 #map cw console rename
303 #map A eval fm.open_console('rename ' + fm.thisfile.basename)
304 #map I eval fm.open_console('rename ' + fm.thisfile.basename, position=7)
305
306 #map pp paste
307 #map po paste overwrite=True
308 #map pl paste_symlink relative=False
309 #map pL paste_symlink relative=True
310 #map phl paste_hardlink
311 #map pht paste_hardlinked_subtree
312
313 #map dd cut
314 #map ud uncut
315 #map da cut mode=add
316 #map dr cut mode=remove
317
318 #map yy copy
319 #map uy uncut
320 #map ya copy mode=add
321 #map yr copy mode=remove
322
323 # Temporary workarounds
324 #map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
325 #map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
326 #map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
327 #map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
328 #map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
329 #map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
330 #map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
331 #map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
332
333 # Searching
334 #map / console search
335 #map n search_next
336 #map N search_next forward=False
337 #map ct search_next order=tag
338 #map cs search_next order=size
339 #map ci search_next order=mimetype
340 #map cc search_next order=ctime
341 #map cm search_next order=mtime
342 #map ca search_next order=atime
343
344 # Tabs
345 #map <C-n> tab_new ~
346 #map <C-w> tab_close
347 #map <TAB> tab_move 1
348 #map <S-TAB> tab_move -1
349 #map <A-Right> tab_move 1
350 #map <A-Left> tab_move -1
351 #map gt tab_move 1
352 #map gT tab_move -1
353 map gn tab_new
354 #map gc tab_close
355 #map uq tab_restore
356 map <a-!> tab_open 1
357 map <a-@> tab_open 2
358 map <a-#> tab_open 3
359 map <a-$> tab_open 4
360 map <a-%> tab_open 5
361 map <a-^> tab_open 6
362 map <a-&> tab_open 7
363 map <a-*> tab_open 8
364 map <a-(> tab_open 9
365
366 # Sorting
367 map or toggle_option sort_reverse
368 map os chain setlocal sort=size; setlocal sort_reverse=False
369 map ob chain setlocal sort=basename; setlocal sort_reverse=False
370 map on chain setlocal sort=natural; setlocal sort_reverse=False
371 map om chain setlocal sort=mtime; setlocal sort_reverse=False
372 map oc chain setlocal sort=ctime; setlocal sort_reverse=False
373 map oa chain setlocal sort=atime; setlocal sort_reverse=False
374 map ot chain setlocal sort=type; setlocal sort_reverse=False
375
376 map oS chain setlocal sort=size; setlocal sort_reverse=True
377 map oB chain setlocal sort=basename; setlocal sort_reverse=True
378 map oN chain setlocal sort=natural; setlocal sort_reverse=True
379 map oM chain setlocal sort=mtime; setlocal sort_reverse=True
380 map oC chain setlocal sort=ctime; setlocal sort_reverse=True
381 map oA chain setlocal sort=atime; setlocal sort_reverse=True
382 map oT chain setlocal sort=type; setlocal sort_reverse=True
383
384 map Or toggle_option sort_reverse
385 map Os chain set sort=size; set sort_reverse=False
386 map Ob chain set sort=basename; set sort_reverse=False
387 map On chain set sort=natural; set sort_reverse=False
388 map Om chain set sort=mtime; set sort_reverse=False
389 map Oc chain set sort=ctime; set sort_reverse=False
390 map Oa chain set sort=atime; set sort_reverse=False
391 map Ot chain set sort=type; set sort_reverse=False
392
393 map OS chain set sort=size; set sort_reverse=True
394 map OB chain set sort=basename; set sort_reverse=True
395 map ON chain set sort=natural; set sort_reverse=True
396 map OM chain set sort=mtime; set sort_reverse=True
397 map OC chain set sort=ctime; set sort_reverse=True
398 map OA chain set sort=atime; set sort_reverse=True
399 map OT chain set sort=type; set sort_reverse=True
400
401 #map dc get_cumulative_size
402
403 # Settings
404 #map zc toggle_option collapse_preview
405 #map zd toggle_option sort_directories_first
406 #map zh toggle_option show_hidden
407 #map <C-h> toggle_option show_hidden
408 #map zi toggle_option flushinput
409 #map zm toggle_option mouse_enabled
410 #map zp toggle_option preview_files
411 #map zP toggle_option preview_directories
412 #map zs toggle_option sort_case_insensitive
413 #map zu toggle_option autoupdate_cumulative_size
414 #map zv toggle_option use_preview_script
415 #map zf console filter
416
417 # Bookmarks
418 #map `<any> enter_bookmark %any
419 #map '<any> enter_bookmark %any
420 #map m<any> set_bookmark %any
421 #map um<any> unset_bookmark %any
422
423 #map m<bg> draw_bookmarks
424 #copymap m<bg> um<bg> `<bg> '<bg>
425
426 # Generate all the chmod bindings with some python help:
427 #eval for arg in "rwxXst": cmd("map +u{0} shell -d chmod u+{0} %s".format(arg))
428 #eval for arg in "rwxXst": cmd("map +g{0} shell -d chmod g+{0} %s".format(arg))
429 #eval for arg in "rwxXst": cmd("map +o{0} shell -d chmod o+{0} %s".format(arg))
430 #eval for arg in "rwxXst": cmd("map +a{0} shell -d chmod a+{0} %s".format(arg))
431 #eval for arg in "rwxXst": cmd("map +{0} shell -d chmod u+{0} %s".format(arg))
432
433 #eval for arg in "rwxXst": cmd("map -u{0} shell -d chmod u-{0} %s".format(arg))
434 #eval for arg in "rwxXst": cmd("map -g{0} shell -d chmod g-{0} %s".format(arg))
435 #eval for arg in "rwxXst": cmd("map -o{0} shell -d chmod o-{0} %s".format(arg))
436 #eval for arg in "rwxXst": cmd("map -a{0} shell -d chmod a-{0} %s".format(arg))
437 #eval for arg in "rwxXst": cmd("map -{0} shell -d chmod u-{0} %s".format(arg))
438
439 # ===================================================================
440 # == Define keys for the console
441 # ===================================================================
442 # Note: Unmapped keys are passed directly to the console.
443
444 # Basic
445 #cmap <tab> eval fm.ui.console.tab()
446 #cmap <s-tab> eval fm.ui.console.tab(-1)
447 #cmap <ESC> eval fm.ui.console.close()
448 #cmap <CR> eval fm.ui.console.execute()
449 #cmap <C-l> redraw_window
450
451 #copycmap <ESC> <C-c>
452 #copycmap <CR> <C-j>
453
454 # Move around
455 #cmap <up> eval fm.ui.console.history_move(-1)
456 #cmap <down> eval fm.ui.console.history_move(1)
457 #cmap <left> eval fm.ui.console.move(left=1)
458 #cmap <right> eval fm.ui.console.move(right=1)
459 #cmap <home> eval fm.ui.console.move(right=0, absolute=True)
460 #cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
461
462 # Line Editing
463 #cmap <backspace> eval fm.ui.console.delete(-1)
464 #cmap <delete> eval fm.ui.console.delete(0)
465 #cmap <C-w> eval fm.ui.console.delete_word()
466 #cmap <C-k> eval fm.ui.console.delete_rest(1)
467 #cmap <C-u> eval fm.ui.console.delete_rest(-1)
468 #cmap <C-y> eval fm.ui.console.paste()
469
470 # And of course the emacs way
471 #copycmap <up> <C-p>
472 #copycmap <down> <C-n>
473 #copycmap <left> <C-b>
474 #copycmap <right> <C-f>
475 #copycmap <home> <C-a>
476 #copycmap <end> <C-e>
477 #copycmap <delete> <C-d>
478 #copycmap <backspace> <C-h>
479
480 # Note: There are multiple ways to express backspaces. <backspace> (code 263)
481 # and <backspace2> (code 127). To be sure, use both.
482 #copycmap <backspace> <backspace2>
483
484 # This special expression allows typing in numerals:
485 #cmap <allow_quantifiers> false
486
487 # ===================================================================
488 # == Pager Keybindings
489 # ===================================================================
490
491 # Movement
492 #pmap <down> pager_move down=1
493 #pmap <up> pager_move up=1
494 #pmap <left> pager_move left=4
495 #pmap <right> pager_move right=4
496 #pmap <home> pager_move to=0
497 #pmap <end> pager_move to=-1
498 #pmap <pagedown> pager_move down=1.0 pages=True
499 #pmap <pageup> pager_move up=1.0 pages=True
500 #pmap <C-d> pager_move down=0.5 pages=True
501 #pmap <C-u> pager_move up=0.5 pages=True
502
503 #copypmap <UP> k <C-p>
504 #copypmap <DOWN> j <C-n> <CR>
505 #copypmap <LEFT> h
506 #copypmap <RIGHT> l
507 #copypmap <HOME> g
508 #copypmap <END> G
509 #copypmap <C-d> d
510 #copypmap <C-u> u
511 #copypmap <PAGEDOWN> n f <C-F> <Space>
512 #copypmap <PAGEUP> p b <C-B>
513
514 # Basic
515 #pmap <ESC> pager_close
516 #copypmap <ESC> q Q i <F3>
517 #pmap E edit_file
518
519 # ===================================================================
520 # == Taskview Keybindings
521 # ===================================================================
522
523 # Movement
524 #tmap <up> taskview_move up=1
525 #tmap <down> taskview_move down=1
526 #tmap <home> taskview_move to=0
527 #tmap <end> taskview_move to=-1
528 #tmap <pagedown> taskview_move down=1.0 pages=True
529 #tmap <pageup> taskview_move up=1.0 pages=True
530 #tmap <C-d> taskview_move down=0.5 pages=True
531 #tmap <C-u> taskview_move up=0.5 pages=True
532
533 #copytmap <UP> k <C-p>
534 #copytmap <DOWN> j <C-n> <CR>
535 #copytmap <HOME> g
536 #copytmap <END> G
537 #copytmap <C-u> u
538 #copytmap <PAGEDOWN> n f <C-F> <Space>
539 #copytmap <PAGEUP> p b <C-B>
540
541 # Changing priority and deleting tasks
542 #tmap J eval -q fm.ui.taskview.task_move(-1)
543 #tmap K eval -q fm.ui.taskview.task_move(0)
544 #tmap dd eval -q fm.ui.taskview.task_remove()
545 #tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
546 #tmap <pageup> eval -q fm.ui.taskview.task_move(0)
547 #tmap <delete> eval -q fm.ui.taskview.task_remove()
548
549 # Basic
550 #tmap <ESC> taskview_close
551 #copytmap <ESC> q Q w <C-c>