Advertisement
evanescente-ondine

rc.conf

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