dotfiles

My dotfiles
git clone git://mcdim.xyz/dotfiles.git
Log | Files | Refs

rc.conf (24364B)


      1 # ===================================================================
      2 # This file contains the default startup commands for ranger.
      3 # To change them, it is recommended to create either /etc/ranger/rc.conf
      4 # (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom
      5 # commands there.
      6 #
      7 # If you copy this whole file there, you may want to set the environment
      8 # variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
      9 #
     10 # The purpose of this file is mainly to define keybindings and settings.
     11 # For running more complex python code, please create a plugin in "plugins/" or
     12 # a command in "commands.py".
     13 #
     14 # Each line is a command that will be run before the user interface
     15 # is initialized.  As a result, you can not use commands which rely
     16 # on the UI such as :delete or :mark.
     17 # ===================================================================
     18 
     19 # ===================================================================
     20 # == Options
     21 # ===================================================================
     22 
     23 # Which viewmode should be used?  Possible values are:
     24 #     miller: Use miller columns which show multiple levels of the hierarchy
     25 #     multipane: Midnight-commander like multipane view showing all tabs next
     26 #                to each other
     27 set viewmode miller
     28 #set viewmode multipane
     29 
     30 # How many columns are there, and what are their relative widths?
     31 set column_ratios 1,3,4
     32 
     33 # Which files should be hidden? (regular expression)
     34 set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
     35 
     36 # Show hidden files? You can toggle this by typing 'zh'
     37 set show_hidden false
     38 
     39 # Ask for a confirmation when running the "delete" command?
     40 # Valid values are "always", "never", "multiple" (default)
     41 # With "multiple", ranger will ask only if you delete multiple files at once.
     42 set confirm_on_delete multiple
     43 
     44 # Use non-default path for file preview script?
     45 # ranger ships with scope.sh, a script that calls external programs (see
     46 # README.md for dependencies) to preview images, archives, etc.
     47 #set preview_script ~/.config/ranger/scope.sh
     48 
     49 # Use the external preview script or display simple plain text or image previews?
     50 set use_preview_script true
     51 
     52 # Automatically count files in the directory, even before entering them?
     53 set automatically_count_files true
     54 
     55 # Open all images in this directory when running certain image viewers
     56 # like feh or sxiv?  You can still open selected files by marking them.
     57 set open_all_images true
     58 
     59 # Be aware of version control systems and display information.
     60 set vcs_aware false
     61 
     62 # State of the four backends git, hg, bzr, svn. The possible states are
     63 # disabled, local (only show local info), enabled (show local and remote
     64 # information).
     65 set vcs_backend_git enabled
     66 set vcs_backend_hg disabled
     67 set vcs_backend_bzr disabled
     68 set vcs_backend_svn disabled
     69 
     70 # Truncate the long commit messages to this length when shown in the statusbar.
     71 set vcs_msg_length 50
     72 
     73 # Use one of the supported image preview protocols
     74 set preview_images false
     75 
     76 # Set the preview image method. Supported methods:
     77 #
     78 # * w3m (default):
     79 #   Preview images in full color with the external command "w3mimgpreview"?
     80 #   This requires the console web browser "w3m" and a supported terminal.
     81 #   It has been successfully tested with "xterm" and "urxvt" without tmux.
     82 #
     83 # * iterm2:
     84 #   Preview images in full color using iTerm2 image previews
     85 #   (http://iterm2.com/images.html). This requires using iTerm2 compiled
     86 #   with image preview support.
     87 #
     88 #   This feature relies on the dimensions of the terminal's font.  By default, a
     89 #   width of 8 and height of 11 are used.  To use other values, set the options
     90 #   iterm2_font_width and iterm2_font_height to the desired values.
     91 #
     92 # * terminology:
     93 #   Previews images in full color in the terminology terminal emulator.
     94 #   Supports a wide variety of formats, even vector graphics like svg.
     95 #
     96 # * urxvt:
     97 #   Preview images in full color using urxvt image backgrounds. This
     98 #   requires using urxvt compiled with pixbuf support.
     99 #
    100 # * urxvt-full:
    101 #   The same as urxvt but utilizing not only the preview pane but the
    102 #   whole terminal window.
    103 #
    104 # * kitty:
    105 #   Preview images in full color using kitty image protocol.
    106 #   Requires python PIL or pillow library.
    107 #   If ranger does not share the local filesystem with kitty
    108 #   the transfer method is changed to encode the whole image;
    109 #   while slower, this allows remote previews,
    110 #   for example during an ssh session.
    111 #   Tmux is unsupported.
    112 #
    113 # * ueberzug:
    114 #   Preview images in full color with the external command "ueberzug".
    115 #   Images are shown by using a child window.
    116 #   Only for users who run X11 in GNU/Linux.
    117 set preview_images_method ueberzug
    118 
    119 # Delay in seconds before displaying an image with the w3m method.
    120 # Increase it in case of experiencing display corruption.
    121 set w3m_delay 0.02
    122 
    123 # Manually adjust the w3mimg offset when using a terminal which needs this
    124 set w3m_offset 0
    125 
    126 # Default iTerm2 font size (see: preview_images_method: iterm2)
    127 set iterm2_font_width 8
    128 set iterm2_font_height 11
    129 
    130 # Use a unicode "..." character to mark cut-off filenames?
    131 set unicode_ellipsis false
    132 
    133 # BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic).
    134 # Requires the python-bidi pip package
    135 set bidi_support false
    136 
    137 # Show dotfiles in the bookmark preview box?
    138 set show_hidden_bookmarks true
    139 
    140 # Which colorscheme to use?  These colorschemes are available by default:
    141 # default, jungle, snow, solarized
    142 set colorscheme default
    143 
    144 # Preview files on the rightmost column?
    145 # And collapse (shrink) the last column if there is nothing to preview?
    146 set preview_files true
    147 set preview_directories true
    148 set collapse_preview true
    149 
    150 # Wrap long lines in plain text previews?
    151 set wrap_plaintext_previews false
    152 
    153 # Save the console history on exit?
    154 set save_console_history true
    155 
    156 # Draw the status bar on top of the browser window (default: bottom)
    157 set status_bar_on_top false
    158 
    159 # Draw a progress bar in the status bar which displays the average state of all
    160 # currently running tasks which support progress bars?
    161 set draw_progress_bar_in_status_bar true
    162 
    163 # Draw borders around columns? (separators, outline, both, or none)
    164 # Separators are vertical lines between columns.
    165 # Outline draws a box around all the columns.
    166 # Both combines the two.
    167 set draw_borders true 
    168 
    169 # Display the directory name in tabs?
    170 set dirname_in_tabs false
    171 
    172 # Enable the mouse support?
    173 set mouse_enabled true
    174 
    175 # Display the file size in the main column or status bar?
    176 set display_size_in_main_column true
    177 set display_size_in_status_bar true
    178 
    179 # Display the free disk space in the status bar?
    180 set display_free_space_in_status_bar true
    181 
    182 # Display files tags in all columns or only in main column?
    183 set display_tags_in_all_columns true
    184 
    185 # Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
    186 set update_title false
    187 
    188 # Set the tmux/screen window-name to "ranger"?
    189 set update_tmux_title true
    190 
    191 # Shorten the title if it gets long?  The number defines how many
    192 # directories are displayed at once, 0 turns off this feature.
    193 set shorten_title 3
    194 
    195 # Show hostname in titlebar?
    196 set hostname_in_titlebar true
    197 
    198 # Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
    199 set tilde_in_titlebar false
    200 
    201 # How many directory-changes or console-commands should be kept in history?
    202 set max_history_size 20
    203 set max_console_history_size 50
    204 
    205 # Try to keep so much space between the top/bottom border when scrolling:
    206 set scroll_offset 8
    207 
    208 # Flush the input after each key hit?  (Noticeable when ranger lags)
    209 set flushinput true
    210 
    211 # Padding on the right when there's no preview?
    212 # This allows you to click into the space to run the file.
    213 set padding_right true
    214 
    215 # Save bookmarks (used with mX and `X) instantly?
    216 # This helps to synchronize bookmarks between multiple ranger
    217 # instances but leads to *slight* performance loss.
    218 # When false, bookmarks are saved when ranger is exited.
    219 set autosave_bookmarks true
    220 
    221 # Save the "`" bookmark to disk.  This can be used to switch to the last
    222 # directory by typing "``".
    223 set save_backtick_bookmark true
    224 
    225 # You can display the "real" cumulative size of directories by using the
    226 # command :get_cumulative_size or typing "dc".  The size is expensive to
    227 # calculate and will not be updated automatically.  You can choose
    228 # to update it automatically though by turning on this option:
    229 set autoupdate_cumulative_size false
    230 
    231 # Turning this on makes sense for screen readers:
    232 set show_cursor false
    233 
    234 # One of: size, natural, basename, atime, ctime, mtime, type, random
    235 set sort natural
    236 
    237 # Additional sorting options
    238 set sort_reverse false
    239 set sort_case_insensitive true
    240 set sort_directories_first true
    241 set sort_unicode false
    242 
    243 # Enable this if key combinations with the Alt Key don't work for you.
    244 # (Especially on xterm)
    245 set xterm_alt_key false
    246 
    247 # Whether to include bookmarks in cd command
    248 set cd_bookmarks true
    249 
    250 # Changes case sensitivity for the cd command tab completion
    251 set cd_tab_case sensitive
    252 
    253 # Use fuzzy tab completion with the "cd" command. For example,
    254 # ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
    255 set cd_tab_fuzzy false
    256 
    257 # Avoid previewing files larger than this size, in bytes.  Use a value of 0 to
    258 # disable this feature.
    259 set preview_max_size 0
    260 
    261 # The key hint lists up to this size have their sublists expanded.
    262 # Otherwise the submaps are replaced with "...".
    263 set hint_collapse_threshold 10
    264 
    265 # Add the highlighted file to the path in the titlebar
    266 set show_selection_in_titlebar true
    267 
    268 # The delay that ranger idly waits for user input, in milliseconds, with a
    269 # resolution of 100ms.  Lower delay reduces lag between directory updates but
    270 # increases CPU load.
    271 set idle_delay 2000
    272 
    273 # When the metadata manager module looks for metadata, should it only look for
    274 # a ".metadata.json" file in the current directory, or do a deep search and
    275 # check all directories above the current one as well?
    276 set metadata_deep_search false
    277 
    278 # Clear all existing filters when leaving a directory
    279 set clear_filters_on_dir_change false
    280 
    281 # Disable displaying line numbers in main column.
    282 # Possible values: false, absolute, relative.
    283 set line_numbers false
    284 
    285 # When line_numbers=relative show the absolute line number in the
    286 # current line.
    287 set relative_current_zero false
    288 
    289 # Start line numbers from 1 instead of 0
    290 set one_indexed false
    291 
    292 # Save tabs on exit
    293 set save_tabs_on_exit false
    294 
    295 # Enable scroll wrapping - moving down while on the last item will wrap around to
    296 # the top and vice versa.
    297 set wrap_scroll false
    298 
    299 # Set the global_inode_type_filter to nothing.  Possible options: d, f and l for
    300 # directories, files and symlinks respectively.
    301 set global_inode_type_filter
    302 
    303 # This setting allows to freeze the list of files to save I/O bandwidth.  It
    304 # should be 'false' during start-up, but you can toggle it by pressing F.
    305 set freeze_files false
    306 
    307 # Print file sizes in bytes instead of the default human-readable format.
    308 set size_in_bytes false
    309 
    310 # Warn at startup if RANGER_LEVEL env var is greater than 0, in other words
    311 # give a warning when you nest ranger in a subshell started by ranger.
    312 # Special value "error" makes the warning more visible.
    313 set nested_ranger_warning true
    314 
    315 # ===================================================================
    316 # == Local Options
    317 # ===================================================================
    318 # You can set local options that only affect a single directory.
    319 
    320 # Examples:
    321 # setlocal path=~/downloads sort mtime
    322 
    323 # ===================================================================
    324 # == Command Aliases in the Console
    325 # ===================================================================
    326 
    327 alias e     edit
    328 alias q     quit
    329 alias q!    quit!
    330 alias qa    quitall
    331 alias qa!   quitall!
    332 alias qall  quitall
    333 alias qall! quitall!
    334 alias setl  setlocal
    335 
    336 alias filter     scout -prts
    337 alias find       scout -aets
    338 alias mark       scout -mr
    339 alias unmark     scout -Mr
    340 alias search     scout -rs
    341 alias search_inc scout -rts
    342 alias travel     scout -aefklst
    343 
    344 # ===================================================================
    345 # == Define keys for the browser
    346 # ===================================================================
    347 
    348 # Basic
    349 map     Q quitall
    350 map     q quit
    351 copymap q ZZ ZQ
    352 
    353 map R     reload_cwd
    354 map F     set freeze_files!
    355 map <C-r> reset
    356 map <C-l> redraw_window
    357 map <C-c> abort
    358 map <esc> change_mode normal
    359 map ~ set viewmode!
    360 
    361 map i display_file
    362 map <A-j> scroll_preview 1
    363 map <A-k> scroll_preview -1
    364 map ? help
    365 map W display_log
    366 map w taskview_open
    367 map S shell $SHELL
    368 
    369 map :  console
    370 map ;  console
    371 map !  console shell%space
    372 map @  console -p6 shell  %%s
    373 map #  console shell -p%space
    374 map s  console shell%space
    375 map r  chain draw_possible_programs; console open_with%space
    376 map f  console find%space
    377 map cd console cd%space
    378 
    379 map <C-p> chain console; eval fm.ui.console.history_move(-1)
    380 
    381 # Change the line mode
    382 map Mf linemode filename
    383 map Mi linemode fileinfo
    384 map Mm linemode mtime
    385 map Mh linemode humanreadablemtime
    386 map Mp linemode permissions
    387 map Ms linemode sizemtime
    388 map MH linemode sizehumanreadablemtime
    389 map Mt linemode metatitle
    390 
    391 # Tagging / Marking
    392 map t       tag_toggle
    393 map ut      tag_remove
    394 map "<any>  tag_toggle tag=%any
    395 map <Space> mark_files toggle=True
    396 map v       mark_files all=True toggle=True
    397 map uv      mark_files all=True val=False
    398 map V       toggle_visual_mode
    399 map uV      toggle_visual_mode reverse=True
    400 
    401 # For the nostalgics: Midnight Commander bindings
    402 map <F1> help
    403 map <F2> rename_append
    404 map <F3> display_file
    405 map <F4> edit
    406 map <F5> copy
    407 map <F6> cut
    408 map <F7> console mkdir%space
    409 map <F8> console delete
    410 #map <F8> console trash
    411 map <F10> exit
    412 
    413 # In case you work on a keyboard with dvorak layout
    414 map <UP>       move up=1
    415 map <DOWN>     move down=1
    416 map <LEFT>     move left=1
    417 map <RIGHT>    move right=1
    418 map <HOME>     move to=0
    419 map <END>      move to=-1
    420 map <PAGEDOWN> move down=1   pages=True
    421 map <PAGEUP>   move up=1     pages=True
    422 map <CR>       move right=1
    423 #map <DELETE>   console delete
    424 map <INSERT>   console touch%space
    425 
    426 #########################
    427 
    428 map ww shell wal -i %f
    429 map xx shell x %f
    430 map gw cd /home/michael/Pictures/wallpapers
    431 
    432 #########################
    433 
    434 # VIM-like
    435 copymap <UP>       k
    436 copymap <DOWN>     j
    437 copymap <LEFT>     h
    438 copymap <RIGHT>    l
    439 copymap <HOME>     gg
    440 copymap <END>      G
    441 copymap <PAGEDOWN> <C-F>
    442 copymap <PAGEUP>   <C-B>
    443 
    444 map J  move down=0.5  pages=True
    445 map K  move up=0.5    pages=True
    446 copymap J <C-D>
    447 copymap K <C-U>
    448 
    449 # Jumping around
    450 map H     history_go -1
    451 map L     history_go 1
    452 map ]     move_parent 1
    453 map [     move_parent -1
    454 map }     traverse
    455 map {     traverse_backwards
    456 map )     jump_non
    457 
    458 map gh cd ~
    459 map ge cd /etc
    460 map gu cd /usr
    461 map gd cd /dev
    462 map gl cd -r .
    463 map gL cd -r %f
    464 map go cd /opt
    465 map gv cd /var
    466 map gm cd /media
    467 map gi eval fm.cd('/run/media/' + os.getenv('USER'))
    468 map gM cd /mnt
    469 map gs cd /srv
    470 map gp cd /tmp
    471 map gr cd /
    472 map gR eval fm.cd(ranger.RANGERDIR)
    473 map g/ cd /
    474 map g? cd /usr/share/doc/ranger
    475 
    476 # External Programs
    477 map E  edit
    478 map du shell -p du --max-depth=1 -h --apparent-size
    479 map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
    480 map yp yank path
    481 map yd yank dir
    482 map yn yank name
    483 map y. yank name_without_extension
    484 
    485 # Filesystem Operations
    486 map =  chmod
    487 
    488 map cw console rename%space
    489 map a  rename_append
    490 map A  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
    491 map I  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
    492 
    493 map pp paste
    494 map po paste overwrite=True
    495 map pP paste append=True
    496 map pO paste overwrite=True append=True
    497 map pl paste_symlink relative=False
    498 map pL paste_symlink relative=True
    499 map phl paste_hardlink
    500 map pht paste_hardlinked_subtree
    501 map pd console paste dest=
    502 map p`<any> paste dest=%any_path
    503 map p'<any> paste dest=%any_path
    504 
    505 map dD console delete
    506 map dT console trash
    507 
    508 map dd cut
    509 map ud uncut
    510 map da cut mode=add
    511 map dr cut mode=remove
    512 map dt cut mode=toggle
    513 
    514 map yy copy
    515 map uy uncut
    516 map ya copy mode=add
    517 map yr copy mode=remove
    518 map yt copy mode=toggle
    519 
    520 # Temporary workarounds
    521 map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
    522 map dG  eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
    523 map dj  eval fm.cut(dirarg=dict(down=1), narg=quantifier)
    524 map dk  eval fm.cut(dirarg=dict(up=1), narg=quantifier)
    525 map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
    526 map yG  eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
    527 map yj  eval fm.copy(dirarg=dict(down=1), narg=quantifier)
    528 map yk  eval fm.copy(dirarg=dict(up=1), narg=quantifier)
    529 
    530 # Searching
    531 map /  console search%space
    532 map n  search_next
    533 map N  search_next forward=False
    534 map ct search_next order=tag
    535 map cs search_next order=size
    536 map ci search_next order=mimetype
    537 map cc search_next order=ctime
    538 map cm search_next order=mtime
    539 map ca search_next order=atime
    540 
    541 # Tabs
    542 map <C-n>     tab_new
    543 map <C-w>     tab_close
    544 map <TAB>     tab_move 1
    545 map <S-TAB>   tab_move -1
    546 map <A-Right> tab_move 1
    547 map <A-Left>  tab_move -1
    548 map gt        tab_move 1
    549 map gT        tab_move -1
    550 map gn        tab_new
    551 map gc        tab_close
    552 map uq        tab_restore
    553 map <a-1>     tab_open 1
    554 map <a-2>     tab_open 2
    555 map <a-3>     tab_open 3
    556 map <a-4>     tab_open 4
    557 map <a-5>     tab_open 5
    558 map <a-6>     tab_open 6
    559 map <a-7>     tab_open 7
    560 map <a-8>     tab_open 8
    561 map <a-9>     tab_open 9
    562 map <a-r>     tab_shift 1
    563 map <a-l>     tab_shift -1
    564 
    565 # Sorting
    566 map or set sort_reverse!
    567 map oz set sort=random
    568 map os chain set sort=size;      set sort_reverse=False
    569 map ob chain set sort=basename;  set sort_reverse=False
    570 map on chain set sort=natural;   set sort_reverse=False
    571 map om chain set sort=mtime;     set sort_reverse=False
    572 map oc chain set sort=ctime;     set sort_reverse=False
    573 map oa chain set sort=atime;     set sort_reverse=False
    574 map ot chain set sort=type;      set sort_reverse=False
    575 map oe chain set sort=extension; set sort_reverse=False
    576 
    577 map oS chain set sort=size;      set sort_reverse=True
    578 map oB chain set sort=basename;  set sort_reverse=True
    579 map oN chain set sort=natural;   set sort_reverse=True
    580 map oM chain set sort=mtime;     set sort_reverse=True
    581 map oC chain set sort=ctime;     set sort_reverse=True
    582 map oA chain set sort=atime;     set sort_reverse=True
    583 map oT chain set sort=type;      set sort_reverse=True
    584 map oE chain set sort=extension; set sort_reverse=True
    585 
    586 map dc get_cumulative_size
    587 
    588 # Settings
    589 map zc    set collapse_preview!
    590 map zd    set sort_directories_first!
    591 map zh    set show_hidden!
    592 map <C-h> set show_hidden!
    593 copymap <C-h> <backspace>
    594 copymap <backspace> <backspace2>
    595 map zI    set flushinput!
    596 map zi    set preview_images!
    597 map zm    set mouse_enabled!
    598 map zp    set preview_files!
    599 map zP    set preview_directories!
    600 map zs    set sort_case_insensitive!
    601 map zu    set autoupdate_cumulative_size!
    602 map zv    set use_preview_script!
    603 map zf    console filter%space
    604 copymap zf zz
    605 
    606 # Filter stack
    607 map .d filter_stack add type d
    608 map .f filter_stack add type f
    609 map .l filter_stack add type l
    610 map .m console filter_stack add mime%space
    611 map .n console filter_stack add name%space
    612 map .# console filter_stack add hash%space
    613 map ." filter_stack add duplicate
    614 map .' filter_stack add unique
    615 map .| filter_stack add or
    616 map .& filter_stack add and
    617 map .! filter_stack add not
    618 map .r filter_stack rotate
    619 map .c filter_stack clear
    620 map .* filter_stack decompose
    621 map .p filter_stack pop
    622 map .. filter_stack show
    623 
    624 # Bookmarks
    625 map `<any>  enter_bookmark %any
    626 map '<any>  enter_bookmark %any
    627 map m<any>  set_bookmark %any
    628 map um<any> unset_bookmark %any
    629 
    630 map m<bg>   draw_bookmarks
    631 copymap m<bg>  um<bg> `<bg> '<bg>
    632 
    633 # Generate all the chmod bindings with some python help:
    634 eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
    635 eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
    636 eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
    637 eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
    638 eval for arg in "rwxXst": cmd("map +{0}  shell -f chmod u+{0} %s".format(arg))
    639 
    640 eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
    641 eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
    642 eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
    643 eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
    644 eval for arg in "rwxXst": cmd("map -{0}  shell -f chmod u-{0} %s".format(arg))
    645 
    646 # ===================================================================
    647 # == Define keys for the console
    648 # ===================================================================
    649 # Note: Unmapped keys are passed directly to the console.
    650 
    651 # Basic
    652 cmap <tab>   eval fm.ui.console.tab()
    653 cmap <s-tab> eval fm.ui.console.tab(-1)
    654 cmap <ESC>   eval fm.ui.console.close()
    655 cmap <CR>    eval fm.ui.console.execute()
    656 cmap <C-l>   redraw_window
    657 
    658 copycmap <ESC> <C-c>
    659 copycmap <CR>  <C-j>
    660 
    661 # Move around
    662 cmap <up>    eval fm.ui.console.history_move(-1)
    663 cmap <down>  eval fm.ui.console.history_move(1)
    664 cmap <left>  eval fm.ui.console.move(left=1)
    665 cmap <right> eval fm.ui.console.move(right=1)
    666 cmap <home>  eval fm.ui.console.move(right=0, absolute=True)
    667 cmap <end>   eval fm.ui.console.move(right=-1, absolute=True)
    668 cmap <a-b> eval fm.ui.console.move_word(left=1)
    669 cmap <a-f> eval fm.ui.console.move_word(right=1)
    670 
    671 copycmap <a-b> <a-left>
    672 copycmap <a-f> <a-right>
    673 
    674 # Line Editing
    675 cmap <backspace>  eval fm.ui.console.delete(-1)
    676 cmap <delete>     eval fm.ui.console.delete(0)
    677 cmap <C-w>        eval fm.ui.console.delete_word()
    678 cmap <A-d>        eval fm.ui.console.delete_word(backward=False)
    679 cmap <C-k>        eval fm.ui.console.delete_rest(1)
    680 cmap <C-u>        eval fm.ui.console.delete_rest(-1)
    681 cmap <C-y>        eval fm.ui.console.paste()
    682 
    683 # And of course the emacs way
    684 copycmap <ESC>       <C-g>
    685 copycmap <up>        <C-p>
    686 copycmap <down>      <C-n>
    687 copycmap <left>      <C-b>
    688 copycmap <right>     <C-f>
    689 copycmap <home>      <C-a>
    690 copycmap <end>       <C-e>
    691 copycmap <delete>    <C-d>
    692 copycmap <backspace> <C-h>
    693 
    694 # Note: There are multiple ways to express backspaces.  <backspace> (code 263)
    695 # and <backspace2> (code 127).  To be sure, use both.
    696 copycmap <backspace> <backspace2>
    697 
    698 # This special expression allows typing in numerals:
    699 cmap <allow_quantifiers> false
    700 
    701 # ===================================================================
    702 # == Pager Keybindings
    703 # ===================================================================
    704 
    705 # Movement
    706 pmap  <down>      pager_move  down=1
    707 pmap  <up>        pager_move  up=1
    708 pmap  <left>      pager_move  left=4
    709 pmap  <right>     pager_move  right=4
    710 pmap  <home>      pager_move  to=0
    711 pmap  <end>       pager_move  to=-1
    712 pmap  <pagedown>  pager_move  down=1.0  pages=True
    713 pmap  <pageup>    pager_move  up=1.0    pages=True
    714 pmap  <C-d>       pager_move  down=0.5  pages=True
    715 pmap  <C-u>       pager_move  up=0.5    pages=True
    716 
    717 copypmap <UP>       k  <C-p>
    718 copypmap <DOWN>     j  <C-n> <CR>
    719 copypmap <LEFT>     h
    720 copypmap <RIGHT>    l
    721 copypmap <HOME>     g
    722 copypmap <END>      G
    723 copypmap <C-d>      d
    724 copypmap <C-u>      u
    725 copypmap <PAGEDOWN> n  f  <C-F>  <Space>
    726 copypmap <PAGEUP>   p  b  <C-B>
    727 
    728 # Basic
    729 pmap     <C-l> redraw_window
    730 pmap     <ESC> pager_close
    731 copypmap <ESC> q Q i <F3>
    732 pmap E      edit_file
    733 
    734 # ===================================================================
    735 # == Taskview Keybindings
    736 # ===================================================================
    737 
    738 # Movement
    739 tmap <up>        taskview_move up=1
    740 tmap <down>      taskview_move down=1
    741 tmap <home>      taskview_move to=0
    742 tmap <end>       taskview_move to=-1
    743 tmap <pagedown>  taskview_move down=1.0  pages=True
    744 tmap <pageup>    taskview_move up=1.0    pages=True
    745 tmap <C-d>       taskview_move down=0.5  pages=True
    746 tmap <C-u>       taskview_move up=0.5    pages=True
    747 
    748 copytmap <UP>       k  <C-p>
    749 copytmap <DOWN>     j  <C-n> <CR>
    750 copytmap <HOME>     g
    751 copytmap <END>      G
    752 copytmap <C-u>      u
    753 copytmap <PAGEDOWN> n  f  <C-F>  <Space>
    754 copytmap <PAGEUP>   p  b  <C-B>
    755 
    756 # Changing priority and deleting tasks
    757 tmap J          eval -q fm.ui.taskview.task_move(-1)
    758 tmap K          eval -q fm.ui.taskview.task_move(0)
    759 tmap dd         eval -q fm.ui.taskview.task_remove()
    760 tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
    761 tmap <pageup>   eval -q fm.ui.taskview.task_move(0)
    762 tmap <delete>   eval -q fm.ui.taskview.task_remove()
    763 
    764 # Basic
    765 tmap <C-l> redraw_window
    766 tmap <ESC> taskview_close
    767 copytmap <ESC> q Q w <C-c>
    768 
    769 set preview_images true