aboutsummaryrefslogtreecommitdiffstats
path: root/.config/ranger/rc.conf
diff options
context:
space:
mode:
Diffstat (limited to '.config/ranger/rc.conf')
-rw-r--r--.config/ranger/rc.conf209
1 files changed, 136 insertions, 73 deletions
diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf
index ab29508..15eca50 100644
--- a/.config/ranger/rc.conf
+++ b/.config/ranger/rc.conf
@@ -1,4 +1,4 @@
-# ==================================================================
+# ===================================================================
# This file contains the default startup commands for ranger.
# To change them, it is recommended to create the file
# ~/.config/ranger/rc.conf and add your custom commands there.
@@ -19,6 +19,13 @@
# == Options
# ===================================================================
+# Which viewmode should be used? Possible values are:
+# miller: Use miller columns which show multiple levels of the hierarchy
+# multipane: Midnight-commander like multipane view showing all tabs next
+# to each other
+set viewmode miller
+#set viewmode multipane
+
# How many columns are there, and what are their relative widths?
set column_ratios 1,3,4
@@ -29,18 +36,21 @@ set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
set show_hidden false
# Ask for a confirmation when running the "delete" command?
-# Valid values are "always" (default), "never", "multiple"
+# Valid values are "always", "never", "multiple" (default)
# With "multiple", ranger will ask only if you delete multiple files at once.
set confirm_on_delete always
# Which script is used to generate file previews?
# ranger ships with scope.sh, a script that calls external programs (see
-# README for dependencies) to preview images, archives, etc.
+# README.md for dependencies) to preview images, archives, etc.
set preview_script ~/.config/ranger/scope.sh
-# Use the external preview script or display simple plain text previews?
+# Use the external preview script or display simple plain text or image previews?
set use_preview_script true
+# Automatically count files in the directory, even before entering them?
+set automatically_count_files true
+
# Open all images in this directory when running certain image viewers
# like feh or sxiv? You can still open selected files by marking them.
set open_all_images true
@@ -55,11 +65,30 @@ set vcs_backend_git enabled
set vcs_backend_hg disabled
set vcs_backend_bzr disabled
-# Preview images in full color with the external command "w3mimgpreview"?
-# This requires the console web browser "w3m" and a supported terminal.
-# It has been successfully tested with "xterm" and "urxvt" without tmux.
+# Use one of the supported image preview protocols
set preview_images false
+# Set the preview image method. Supported methods:
+#
+# * w3m (default):
+# Preview images in full color with the external command "w3mimgpreview"?
+# This requires the console web browser "w3m" and a supported terminal.
+# It has been successfully tested with "xterm" and "urxvt" without tmux.
+#
+# * iterm2:
+# Preview images in full color using iTerm2 image previews
+# (http://iterm2.com/images.html). This requires using iTerm2 compiled
+# with image preview support.
+#
+# * urxvt:
+# Preview images in full color using urxvt image backgrounds. This
+# requires using urxvt compiled with pixbuf support.
+#
+# * urxvt-full:
+# The same as urxvt but utilizing not only the preview pane but the
+# whole terminal window.
+set preview_images_method urxvt
+
# Use a unicode "..." character to mark cut-off filenames?
set unicode_ellipsis false
@@ -67,17 +96,17 @@ set unicode_ellipsis false
set show_hidden_bookmarks true
# Which colorscheme to use? These colorschemes are available by default:
-# default, jungle, snow
+# default, jungle, snow, solarized
set colorscheme default
# Preview files on the rightmost column?
# And collapse (shrink) the last column if there is nothing to preview?
set preview_files true
set preview_directories true
-set collapse_preview false
+set collapse_preview true
# Save the console history on exit?
-set save_console_history true
+set save_console_history false
# Draw the status bar on top of the browser window (default: bottom)
set status_bar_on_top false
@@ -122,7 +151,7 @@ set max_console_history_size 50
# Try to keep so much space between the top/bottom border when scrolling:
set scroll_offset 8
-# Flush the input after each key hit? (Noticable when ranger lags)
+# Flush the input after each key hit? (Noticeable when ranger lags)
set flushinput true
# Padding on the right when there's no preview?
@@ -144,18 +173,45 @@ set autoupdate_cumulative_size false
# Turning this on makes sense for screen readers:
set show_cursor false
-# One of: size, basename, mtime, type
+# One of: size, natural, basename, atime, ctime, mtime, type, random
set sort natural
# Additional sorting options
set sort_reverse false
set sort_case_insensitive true
set sort_directories_first true
+set sort_unicode true
# Enable this if key combinations with the Alt Key don't work for you.
# (Especially on xterm)
set xterm_alt_key false
+# Whether to include bookmarks in cd command
+set cd_bookmarks false
+
+# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
+# disable this feature.
+set preview_max_size 0
+
+# Add the highlighted file to the path in the titlebar
+set show_selection_in_titlebar true
+
+# The delay that ranger idly waits for user input, in milliseconds, with a
+# resolution of 100ms. Lower delay reduces lag between directory updates but
+# increases CPU load.
+set idle_delay 2000
+
+# When the metadata manager module looks for metadata, should it only look for
+# a ".metadata.json" file in the current directory, or do a deep search and
+# check all directories above the current one as well?
+set metadata_deep_search false
+
+# Clear all existing filters when leaving a directory
+set clear_filters_on_dir_change false
+
+# Disable displaying line numbers in main column
+set line_numbers false
+
# ===================================================================
# == Local Options
# ===================================================================
@@ -171,11 +227,12 @@ set xterm_alt_key false
alias e edit
alias q quit
alias q! quitall
+alias qa quitall
alias qall quitall
alias setl setlocal
alias filter scout -prt
-alias find scout -aet
+alias find scout -aeit
alias mark scout -mr
alias unmark scout -Mr
alias search scout -rs
@@ -196,6 +253,7 @@ map <C-r> reset
map <C-l> redraw_window
map <C-c> abort
map <esc> change_mode normal
+map ~ set viewmode!
map i display_file
map ? help
@@ -203,18 +261,23 @@ map W display_log
map w taskview_open
map S shell $SHELL
-map de delete
-
map : console
map ; console
-map ! console shell
+map ! console shell%space
map @ console -p6 shell %%s
-map # console shell -p
-map l console shell -p
-map s console shell
-map r chain draw_possible_programs; console open_with
-map f console find
-map cd console cd
+map # console shell -p%space
+map s console shell%space
+map r chain draw_possible_programs; console open_with%%space
+map f console find%space
+map cd console cd%space
+
+# Change the line mode
+map Mf linemode filename
+map Mi linemode fileinfo
+map Mm linemode mtime
+map Mp linemode permissions
+map Ms linemode sizemtime
+map Mt linemode metatitle
# Tagging / Marking
map t tag_toggle
@@ -232,7 +295,7 @@ map <F3> display_file
map <F4> edit
map <F5> copy
map <F6> cut
-map <F7> console mkdir
+map <F7> console mkdir%space
map <F8> console delete
map <F10> exit
@@ -246,8 +309,8 @@ map <END> move to=-1
map <PAGEDOWN> move down=1 pages=True
map <PAGEUP> move up=1 pages=True
map <CR> move right=1
-map <DELETE> console delete
-map <INSERT> console touch
+#map <DELETE> console delete
+map <INSERT> console touch%space
# VIM-like
copymap <UP> k
@@ -271,53 +334,44 @@ map ] move_parent 1
map [ move_parent -1
map } traverse
-map gh cd ~
-map ge cd /etc
-map gu cd /usr
-map gd cd /dev
-map gl cd -r .
-map gL cd -r %f
-map go cd /opt
-map gv cd /var
-map gm cd /media
-map gM cd /mnt
-map gs cd /srv
-map gr cd /
-map gR eval fm.cd(ranger.RANGERDIR)
-map g/ cd /
-map g? cd /usr/share/doc/ranger
-
# External Programs
map E edit
map du shell -p du --max-depth=1 -h --apparent-size
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
-map yp shell -d echo -n %d/%f | xsel -i
-map yd shell -d echo -n %d | xsel -i
-map yn shell -d echo -n %f | xsel -i
+map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b
+map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b
+map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
# Filesystem Operations
map = chmod
-map cw console rename
-map A eval fm.open_console('rename ' + fm.thisfile.basename)
-map I eval fm.open_console('rename ' + fm.thisfile.basename, position=7)
+map cw console rename%space
+map a rename_append
+map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
+map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
map pp paste
map po paste overwrite=True
+map pP paste append=True
+map pO paste overwrite=True append=True
map pl paste_symlink relative=False
map pL paste_symlink relative=True
map phl paste_hardlink
map pht paste_hardlinked_subtree
+map dD console delete
+
map dd cut
map ud uncut
map da cut mode=add
map dr cut mode=remove
+map dt cut mode=toggle
map yy copy
map uy uncut
map ya copy mode=add
map yr copy mode=remove
+map yt copy mode=toggle
# Temporary workarounds
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
@@ -330,7 +384,7 @@ map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
# Searching
-map / console search
+map / console search%space
map n search_next
map N search_next forward=False
map ct search_next order=tag
@@ -342,7 +396,7 @@ map ca search_next order=atime
# Tabs
map <C-t> tab_new ~
-map <C-n> tab_move 1
+map <C-t> tab_move 1
map <C-p> tab_move -1
map <C-w> tab_close
map <TAB> tab_move 1
@@ -365,7 +419,8 @@ map <a-8> tab_open 8
map <a-9> tab_open 9
# Sorting
-map or toggle_option sort_reverse
+map or set sort_reverse!
+map oz set sort=random
map os chain set sort=size; set sort_reverse=False
map ob chain set sort=basename; set sort_reverse=False
map on chain set sort=natural; set sort_reverse=False
@@ -373,6 +428,7 @@ map om chain set sort=mtime; set sort_reverse=False
map oc chain set sort=ctime; set sort_reverse=False
map oa chain set sort=atime; set sort_reverse=False
map ot chain set sort=type; set sort_reverse=False
+map oe chain set sort=extension; set sort_reverse=False
map oS chain set sort=size; set sort_reverse=True
map oB chain set sort=basename; set sort_reverse=True
@@ -381,22 +437,24 @@ map oM chain set sort=mtime; set sort_reverse=True
map oC chain set sort=ctime; set sort_reverse=True
map oA chain set sort=atime; set sort_reverse=True
map oT chain set sort=type; set sort_reverse=True
+map oE chain set sort=extension; set sort_reverse=True
map dc get_cumulative_size
# Settings
-map zc toggle_option collapse_preview
-map zd toggle_option sort_directories_first
-map zh toggle_option show_hidden
-map <C-h> toggle_option show_hidden
-map zi toggle_option flushinput
-map zm toggle_option mouse_enabled
-map zp toggle_option preview_files
-map zP toggle_option preview_directories
-map zs toggle_option sort_case_insensitive
-map zu toggle_option autoupdate_cumulative_size
-map zv toggle_option use_preview_script
-map zf console filter
+map zc set collapse_preview!
+map zd set sort_directories_first!
+map zh set show_hidden!
+map <C-h> set show_hidden!
+map zI set flushinput!
+map zi set preview_images!
+map zm set mouse_enabled!
+map zp set preview_files!
+map zP set preview_directories!
+map zs set sort_case_insensitive!
+map zu set autoupdate_cumulative_size!
+map zv set use_preview_script!
+map zf console filter%space
# Bookmarks
map `<any> enter_bookmark %any
@@ -408,17 +466,17 @@ map m<bg> draw_bookmarks
copymap m<bg> um<bg> `<bg> '<bg>
# Generate all the chmod bindings with some python help:
-eval for arg in "rwxXst": cmd("map +u{0} shell -d chmod u+{0} %s".format(arg))
-eval for arg in "rwxXst": cmd("map +g{0} shell -d chmod g+{0} %s".format(arg))
-eval for arg in "rwxXst": cmd("map +o{0} shell -d chmod o+{0} %s".format(arg))
-eval for arg in "rwxXst": cmd("map +a{0} shell -d chmod a+{0} %s".format(arg))
-eval for arg in "rwxXst": cmd("map +{0} shell -d chmod u+{0} %s".format(arg))
-
-eval for arg in "rwxXst": cmd("map -u{0} shell -d chmod u-{0} %s".format(arg))
-eval for arg in "rwxXst": cmd("map -g{0} shell -d chmod g-{0} %s".format(arg))
-eval for arg in "rwxXst": cmd("map -o{0} shell -d chmod o-{0} %s".format(arg))
-eval for arg in "rwxXst": cmd("map -a{0} shell -d chmod a-{0} %s".format(arg))
-eval for arg in "rwxXst": cmd("map -{0} shell -d chmod u-{0} %s".format(arg))
+eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
+eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
+eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
+eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
+eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
+
+eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
+eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
+eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
+eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
+eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
# ===================================================================
# == Define keys for the console
@@ -442,11 +500,14 @@ cmap <left> eval fm.ui.console.move(left=1)
cmap <right> eval fm.ui.console.move(right=1)
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
+cmap <a-left> eval fm.ui.console.move_word(left=1)
+cmap <a-right> eval fm.ui.console.move_word(right=1)
# Line Editing
cmap <backspace> eval fm.ui.console.delete(-1)
cmap <delete> eval fm.ui.console.delete(0)
cmap <C-w> eval fm.ui.console.delete_word()
+cmap <A-d> eval fm.ui.console.delete_word(backward=False)
cmap <C-k> eval fm.ui.console.delete_rest(1)
cmap <C-u> eval fm.ui.console.delete_rest(-1)
cmap <C-y> eval fm.ui.console.paste()
@@ -496,6 +557,7 @@ copypmap <PAGEDOWN> n f <C-F> <Space>
copypmap <PAGEUP> p b <C-B>
# Basic
+pmap <C-l> redraw_window
pmap <ESC> pager_close
copypmap <ESC> q Q i <F3>
pmap E edit_file
@@ -531,5 +593,6 @@ tmap <pageup> eval -q fm.ui.taskview.task_move(0)
tmap <delete> eval -q fm.ui.taskview.task_remove()
# Basic
+tmap <C-l> redraw_window
tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c>