dotfiles

Personal dotfiles
git clone git://git.laack.co/dotfiles.git
Log | Files | Refs

rc.conf (24194B)


      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 never
     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 false
     58 
     59 # Be aware of version control systems and display information.
     60 set vcs_aware true
     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 w3m
    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 none
    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 relative
    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       toggle_visual_mode
    397 map us      mark_files all=True val=False
    398 map V console shell vim%space
    399 
    400 # For the nostalgics: Midnight Commander bindings
    401 map <F1> help
    402 map <F2> rename_append
    403 map <F3> display_file
    404 map <F4> edit
    405 map <F5> copy
    406 map <F6> cut
    407 map <F7> console mkdir%space
    408 map <F8> console delete
    409 #map <F8> console trash
    410 map <F10> exit
    411 
    412 # In case you work on a keyboard with dvorak layout
    413 map <UP>       move up=1
    414 map <DOWN>     move down=1
    415 map <LEFT>     move left=1
    416 map <RIGHT>    move right=1
    417 map <HOME>     move to=0
    418 map <END>      move to=-1
    419 map <PAGEDOWN> move down=1   pages=True
    420 map <PAGEUP>   move up=1     pages=True
    421 map <CR>       move right=1
    422 #map <DELETE>   console delete
    423 map <INSERT>   console touch%space
    424 
    425 # VIM-like
    426 copymap <UP>       k
    427 copymap <DOWN>     j
    428 copymap <LEFT>     h
    429 copymap <RIGHT>    l
    430 copymap <HOME>     gg
    431 copymap <END>      G
    432 copymap <PAGEDOWN> <C-F>
    433 copymap <PAGEUP>   <C-B>
    434 
    435 map J  move down=0.5  pages=True
    436 map K  move up=0.5    pages=True
    437 copymap J <C-D>
    438 copymap K <C-U>
    439 
    440 # Jumping around
    441 map H     history_go -1
    442 map L     history_go 1
    443 map ]     move_parent 1
    444 map [     move_parent -1
    445 map }     traverse
    446 map {     traverse_backwards
    447 map )     jump_non
    448 
    449 map gh cd ~
    450 map ge cd /etc
    451 map gu cd /usr
    452 map gd cd /dev
    453 map gl cd -r .
    454 map gL cd -r %f
    455 map go cd /opt
    456 map gv cd /var
    457 map gm cd /media
    458 map gi eval fm.cd('/run/media/' + os.getenv('USER'))
    459 map gM cd /mnt
    460 map gs cd /srv
    461 map gp cd /tmp
    462 map gr cd /
    463 map gR eval fm.cd(ranger.RANGERDIR)
    464 map g/ cd /
    465 map g? cd /usr/share/doc/ranger
    466 
    467 # External Programs
    468 map E  edit
    469 map du shell -p du --max-depth=1 -h --apparent-size
    470 map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
    471 map yp yank path
    472 map yd yank dir
    473 map yn yank name
    474 map y. yank name_without_extension
    475 
    476 # Filesystem Operations
    477 map =  chmod
    478 
    479 map cw console rename%space
    480 map a  rename_append
    481 map A  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
    482 map I  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
    483 
    484 map pp paste
    485 map po paste overwrite=True
    486 map pP paste append=True
    487 map pO paste overwrite=True append=True
    488 map pl paste_symlink relative=False
    489 map pL paste_symlink relative=True
    490 map phl paste_hardlink
    491 map pht paste_hardlinked_subtree
    492 map pd console paste dest=
    493 map p`<any> paste dest=%any_path
    494 map p'<any> paste dest=%any_path
    495 
    496 map dD delete
    497 map dT console trash
    498 
    499 map dd cut
    500 map ud uncut
    501 map da cut mode=add
    502 map dr cut mode=remove
    503 map dt cut mode=toggle
    504 
    505 map yy copy
    506 map uy uncut
    507 map ya copy mode=add
    508 map yr copy mode=remove
    509 map yt copy mode=toggle
    510 
    511 # Temporary workarounds
    512 map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
    513 map dG  eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
    514 map dj  eval fm.cut(dirarg=dict(down=1), narg=quantifier)
    515 map dk  eval fm.cut(dirarg=dict(up=1), narg=quantifier)
    516 map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
    517 map yG  eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
    518 map yj  eval fm.copy(dirarg=dict(down=1), narg=quantifier)
    519 map yk  eval fm.copy(dirarg=dict(up=1), narg=quantifier)
    520 
    521 # Searching
    522 map /  console search%space
    523 map n  search_next
    524 map N  search_next forward=False
    525 map ct search_next order=tag
    526 map cs search_next order=size
    527 map ci search_next order=mimetype
    528 map cc search_next order=ctime
    529 map cm search_next order=mtime
    530 map ca search_next order=atime
    531 
    532 # Tabs
    533 map <C-n>     tab_new
    534 map <C-w>     tab_close
    535 map <TAB>     tab_move 1
    536 map <S-TAB>   tab_move -1
    537 map <A-Right> tab_move 1
    538 map <A-Left>  tab_move -1
    539 map gt        tab_move 1
    540 map gT        tab_move -1
    541 map gn        tab_new
    542 map gc        tab_close
    543 map uq        tab_restore
    544 map <a-1>     tab_open 1
    545 map <a-2>     tab_open 2
    546 map <a-3>     tab_open 3
    547 map <a-4>     tab_open 4
    548 map <a-5>     tab_open 5
    549 map <a-6>     tab_open 6
    550 map <a-7>     tab_open 7
    551 map <a-8>     tab_open 8
    552 map <a-9>     tab_open 9
    553 map <a-r>     tab_shift 1
    554 map <a-l>     tab_shift -1
    555 
    556 # Sorting
    557 map or set sort_reverse!
    558 map oz set sort=random
    559 map os chain set sort=size;      set sort_reverse=False
    560 map ob chain set sort=basename;  set sort_reverse=False
    561 map on chain set sort=natural;   set sort_reverse=False
    562 map om chain set sort=mtime;     set sort_reverse=False
    563 map oc chain set sort=ctime;     set sort_reverse=False
    564 map oa chain set sort=atime;     set sort_reverse=False
    565 map ot chain set sort=type;      set sort_reverse=False
    566 map oe chain set sort=extension; set sort_reverse=False
    567 
    568 map oS chain set sort=size;      set sort_reverse=True
    569 map oB chain set sort=basename;  set sort_reverse=True
    570 map oN chain set sort=natural;   set sort_reverse=True
    571 map oM chain set sort=mtime;     set sort_reverse=True
    572 map oC chain set sort=ctime;     set sort_reverse=True
    573 map oA chain set sort=atime;     set sort_reverse=True
    574 map oT chain set sort=type;      set sort_reverse=True
    575 map oE chain set sort=extension; set sort_reverse=True
    576 
    577 map dc get_cumulative_size
    578 
    579 # Settings
    580 map zc    set collapse_preview!
    581 map zd    set sort_directories_first!
    582 map zh    set show_hidden!
    583 map <C-h> set show_hidden!
    584 copymap <C-h> <backspace>
    585 copymap <backspace> <backspace2>
    586 map zI    set flushinput!
    587 map zi    set preview_images!
    588 map zm    set mouse_enabled!
    589 map zp    set preview_files!
    590 map zP    set preview_directories!
    591 map zs    set sort_case_insensitive!
    592 map zu    set autoupdate_cumulative_size!
    593 map zv    set use_preview_script!
    594 map zf    console filter%space
    595 copymap zf zz
    596 
    597 # Filter stack
    598 map .d filter_stack add type d
    599 map .f filter_stack add type f
    600 map .l filter_stack add type l
    601 map .m console filter_stack add mime%space
    602 map .n console filter_stack add name%space
    603 map .# console filter_stack add hash%space
    604 map ." filter_stack add duplicate
    605 map .' filter_stack add unique
    606 map .| filter_stack add or
    607 map .& filter_stack add and
    608 map .! filter_stack add not
    609 map .r filter_stack rotate
    610 map .c filter_stack clear
    611 map .* filter_stack decompose
    612 map .p filter_stack pop
    613 map .. filter_stack show
    614 
    615 # Bookmarks
    616 map `<any>  enter_bookmark %any
    617 map '<any>  enter_bookmark %any
    618 map m<any>  set_bookmark %any
    619 map um<any> unset_bookmark %any
    620 
    621 map m<bg>   draw_bookmarks
    622 copymap m<bg>  um<bg> `<bg> '<bg>
    623 
    624 # Generate all the chmod bindings with some python help:
    625 eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
    626 eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
    627 eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
    628 eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
    629 eval for arg in "rwxXst": cmd("map +{0}  shell -f chmod u+{0} %s".format(arg))
    630 
    631 eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
    632 eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
    633 eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
    634 eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
    635 eval for arg in "rwxXst": cmd("map -{0}  shell -f chmod u-{0} %s".format(arg))
    636 
    637 # ===================================================================
    638 # == Define keys for the console
    639 # ===================================================================
    640 # Note: Unmapped keys are passed directly to the console.
    641 
    642 # Basic
    643 cmap <tab>   eval fm.ui.console.tab()
    644 cmap <s-tab> eval fm.ui.console.tab(-1)
    645 cmap <ESC>   eval fm.ui.console.close()
    646 cmap <CR>    eval fm.ui.console.execute()
    647 cmap <C-l>   redraw_window
    648 
    649 copycmap <ESC> <C-c>
    650 copycmap <CR>  <C-j>
    651 
    652 # Move around
    653 cmap <up>    eval fm.ui.console.history_move(-1)
    654 cmap <down>  eval fm.ui.console.history_move(1)
    655 cmap <left>  eval fm.ui.console.move(left=1)
    656 cmap <right> eval fm.ui.console.move(right=1)
    657 cmap <home>  eval fm.ui.console.move(right=0, absolute=True)
    658 cmap <end>   eval fm.ui.console.move(right=-1, absolute=True)
    659 cmap <a-b> eval fm.ui.console.move_word(left=1)
    660 cmap <a-f> eval fm.ui.console.move_word(right=1)
    661 
    662 copycmap <a-b> <a-left>
    663 copycmap <a-f> <a-right>
    664 
    665 # Line Editing
    666 cmap <backspace>  eval fm.ui.console.delete(-1)
    667 cmap <delete>     eval fm.ui.console.delete(0)
    668 cmap <C-w>        eval fm.ui.console.delete_word()
    669 cmap <A-d>        eval fm.ui.console.delete_word(backward=False)
    670 cmap <C-k>        eval fm.ui.console.delete_rest(1)
    671 cmap <C-u>        eval fm.ui.console.delete_rest(-1)
    672 cmap <C-y>        eval fm.ui.console.paste()
    673 
    674 # And of course the emacs way
    675 copycmap <ESC>       <C-g>
    676 copycmap <up>        <C-p>
    677 copycmap <down>      <C-n>
    678 copycmap <left>      <C-b>
    679 copycmap <right>     <C-f>
    680 copycmap <home>      <C-a>
    681 copycmap <end>       <C-e>
    682 copycmap <delete>    <C-d>
    683 copycmap <backspace> <C-h>
    684 
    685 # Note: There are multiple ways to express backspaces.  <backspace> (code 263)
    686 # and <backspace2> (code 127).  To be sure, use both.
    687 copycmap <backspace> <backspace2>
    688 
    689 # This special expression allows typing in numerals:
    690 cmap <allow_quantifiers> false
    691 
    692 # ===================================================================
    693 # == Pager Keybindings
    694 # ===================================================================
    695 
    696 # Movement
    697 pmap  <down>      pager_move  down=1
    698 pmap  <up>        pager_move  up=1
    699 pmap  <left>      pager_move  left=4
    700 pmap  <right>     pager_move  right=4
    701 pmap  <home>      pager_move  to=0
    702 pmap  <end>       pager_move  to=-1
    703 pmap  <pagedown>  pager_move  down=1.0  pages=True
    704 pmap  <pageup>    pager_move  up=1.0    pages=True
    705 pmap  <C-d>       pager_move  down=0.5  pages=True
    706 pmap  <C-u>       pager_move  up=0.5    pages=True
    707 
    708 copypmap <UP>       k  <C-p>
    709 copypmap <DOWN>     j  <C-n> <CR>
    710 copypmap <LEFT>     h
    711 copypmap <RIGHT>    l
    712 copypmap <HOME>     g
    713 copypmap <END>      G
    714 copypmap <C-d>      d
    715 copypmap <C-u>      u
    716 copypmap <PAGEDOWN> n  f  <C-F>  <Space>
    717 copypmap <PAGEUP>   p  b  <C-B>
    718 
    719 # Basic
    720 pmap     <C-l> redraw_window
    721 pmap     <ESC> pager_close
    722 copypmap <ESC> q Q i <F3>
    723 pmap E      edit_file
    724 
    725 # ===================================================================
    726 # == Taskview Keybindings
    727 # ===================================================================
    728 
    729 # Movement
    730 tmap <up>        taskview_move up=1
    731 tmap <down>      taskview_move down=1
    732 tmap <home>      taskview_move to=0
    733 tmap <end>       taskview_move to=-1
    734 tmap <pagedown>  taskview_move down=1.0  pages=True
    735 tmap <pageup>    taskview_move up=1.0    pages=True
    736 tmap <C-d>       taskview_move down=0.5  pages=True
    737 tmap <C-u>       taskview_move up=0.5    pages=True
    738 
    739 copytmap <UP>       k  <C-p>
    740 copytmap <DOWN>     j  <C-n> <CR>
    741 copytmap <HOME>     g
    742 copytmap <END>      G
    743 copytmap <C-u>      u
    744 copytmap <PAGEDOWN> n  f  <C-F>  <Space>
    745 copytmap <PAGEUP>   p  b  <C-B>
    746 
    747 # Changing priority and deleting tasks
    748 tmap J          eval -q fm.ui.taskview.task_move(-1)
    749 tmap K          eval -q fm.ui.taskview.task_move(0)
    750 tmap dd         eval -q fm.ui.taskview.task_remove()
    751 tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
    752 tmap <pageup>   eval -q fm.ui.taskview.task_move(0)
    753 tmap <delete>   eval -q fm.ui.taskview.task_remove()
    754 
    755 # Basic
    756 tmap <C-l> redraw_window
    757 tmap <ESC> taskview_close
    758 copytmap <ESC> q Q w <C-c>
    759 
    760 map cd console z%space
    761 
    762 map do shell $HOME/bin/dragonRanger.sh %p