.inputrc 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # History
  2. # -----------------------------------------------------------------------------
  3. # Use more intelligent Up/Down behaviour: use the text that has already been
  4. # typed as the prefix for searching through commands, like in Vim.
  5. "\e[B": history-search-forward
  6. "\e[A": history-search-backward
  7. # Remember the cursor position for each history line. Note that this only works
  8. # for previous-history and next-history, and apparently not (or not so well)
  9. # with my Up/Down key bindings history-search-{back,for}ward.
  10. set history-preserve-point on
  11. # Autocompletion
  12. # -----------------------------------------------------------------------------
  13. # Make Tab autocompletion case-insensitive (cd ~/dow<Tab> => cd ~/Downloads/).
  14. set completion-ignore-case On
  15. # When autocompleting symlinks to directories, immediately add a trailing "/".
  16. set mark-symlinked-directories on
  17. # Flip through autocompletion matches with Shift-Tab.
  18. "\e[Z": menu-complete
  19. # Do not autocomplete hidden files ("dot files") unless the pattern explicitly
  20. # begins with a dot.
  21. set match-hidden-files off
  22. # Show all autocomplete results at once.
  23. set page-completions off
  24. # If there are more than 200 possible completions for a word, ask to show them
  25. # all.
  26. set completion-query-items 200
  27. # Immediately show all possible completions.
  28. set show-all-if-ambiguous on
  29. # Show extra file information when completing, like ls -F does.
  30. set visible-stats on
  31. # Be more intelligent when autocompleting by also looking at the text after
  32. # the cursor. For example, when the current line is "cd ~/src/mozil", and
  33. # the cursor is on the "z", pressing Tab will not autocomplete it to "cd
  34. # ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the
  35. # Readline used by Bash 4.)
  36. set skip-completed-text on
  37. # Line editing
  38. # -----------------------------------------------------------------------------
  39. # Allow UTF-8 input and output, instead of showing them like $'\0123\0456'.
  40. set input-meta on
  41. set output-meta on
  42. set convert-meta off
  43. # Use Alt/Meta+Delete to delete the preceding word.
  44. "\e[3;3~": kill-word
  45. # Delete for wonky terminals.
  46. "\e[3~": delete-char
  47. # Use Ctrl+␠and Ctrl+⒠(or Alt/Meta, or Esc) to move between words.
  48. "\e[1;5D": backward-word
  49. "\e[1;3D": backward-word
  50. "\e[5D": backward-word
  51. "\e\e[D": backward-word
  52. "\e[1;5C": forward-word
  53. "\e[1;3C": forward-word
  54. "\e[5C": forward-word
  55. "\e\e[C": forward-word
  56. # Miscellaneous
  57. # -----------------------------------------------------------------------------
  58. # Neither sound a beep nor flash the screen when trying to ring the bell.
  59. set bell-style none
  60. # History
  61. # -----------------------------------------------------------------------------
  62. # Use more intelligent Up/Down behaviour: use the text that has already been
  63. # typed as the prefix for searching through commands, like in Vim.
  64. "\e[B": history-search-forward
  65. "\e[A": history-search-backward
  66. # Remember the cursor position for each history line. Note that this only works
  67. # for previous-history and next-history, and apparently not (or not so well)
  68. # with my Up/Down key bindings history-search-{back,for}ward.
  69. set history-preserve-point on
  70. # Line editing
  71. # -----------------------------------------------------------------------------
  72. # Allow UTF-8 input and output, instead of showing them like $'\0123\0456'.
  73. set input-meta on
  74. set output-meta on
  75. set convert-meta off
  76. # Use Alt/Meta+Delete to delete the preceding word.
  77. "\e[3;3~": kill-word
  78. # Delete for wonky terminals.
  79. "\e[3~": delete-char
  80. # Use Alt+← and Alt+→ to move between words.
  81. "\e[1;9D": backward-word
  82. "\e[1;9C": forward-word
  83. # Use Control+← and Control+→
  84. "\e[1;5D": backward-word
  85. "\e[1;5C": forward-word
  86. # Miscellaneous
  87. # -----------------------------------------------------------------------------
  88. # Neither sound a beep nor flash the screen when trying to ring the bell.
  89. set bell-style none