dotfiles

My collection of dotfiles
git clone git://git.stellar-nexus.ru/dotfiles
Log | Files | Refs

rc.conf (24193B)


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