Advertisement
Guest User

inputrc

a guest
Aug 17th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. ### INPUTRC ###
  2.  
  3. $include /etc/inputrc
  4.  
  5.  
  6. # Completion settings
  7. set completion-ignore-case on
  8. #set completion-query-items -1
  9. set show-all-if-ambiguous on
  10. set colored-completion-prefix on
  11. set colored-stats on
  12. #tab:menu-complete
  13. #"\e[Z":menu-complete-backward
  14.  
  15. # Disable control echo
  16. set echo-control-characters off
  17.  
  18. # Invoke the manual for the command preceding the cursor by pressing Alt+h
  19. #"\eh": "\C-a\eb\ed\C-y\e#man \C-y\C-m\C-p\C-p\C-a\C-d\C-e"
  20.  
  21. # Alt+Ctrl+n starts a new terminal in working directory
  22. #"\e\C-n": "urxvt &\ndisown\n"
  23. # Alt+Ctrl+f starts thunar in working directory
  24. #"\e\C-f": "thunar &\ndisown\n"
  25.  
  26. # Incremental search (Vi-like)
  27. #"\e[A": history-search-backward
  28. #"\e[B": history-search-forward
  29. #"\e[C": forward-char
  30. #"\e[D": backward-char
  31.  
  32.  
  33. # Can be set to either emacs or vi
  34. set editing-mode vi
  35.  
  36. set show-mode-in-prompt on
  37. set vi-ins-mode-string (\1\e[34;1m\2ins\1\e[0m\2)
  38. set vi-cmd-mode-string (\1\e[35;1m\2cmd\1\e[0m\2)
  39.  
  40. $if mode=vi
  41.  
  42. set keymap vi-insert
  43. ### Keybinds for insert mode ###
  44.  
  45. # Ctrl+l for clear
  46. "\C-l": clear-screen
  47.  
  48. # Glob patterns without executing, eg: 'rm *x'
  49. "\ee": glob-expand-word
  50.  
  51. # Edit options before rerunning previous command, eg: ls a b c -> ls -al a b c
  52. "\C-o": "\e-0eli "
  53.  
  54. # Cycle thru completions.
  55. # maybe bind another function here to display the selected item
  56. "\el": menu-complete
  57. "\eh": menu-complete-backward
  58.  
  59. ## Two escapes clear command line.
  60. #"\e\e": "\e0\C-ki"
  61.  
  62. set keymap vi-command
  63. ### Keybinds for command mode ###
  64.  
  65. "\ee": glob-expand-word
  66.  
  67. $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement