1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,120 @@ |
1 |
+# Include global defaults (if they exist). Hopefully they deal with platform |
|
2 |
+# specific quirks. |
|
3 |
+$include /usr/share/readline/inputrc |
|
4 |
+$include /etc/inputrc |
|
5 |
+ |
|
6 |
+# Use vi editing mode. |
|
7 |
+set editing-mode vi |
|
8 |
+ |
|
9 |
+# Disable keyseq timeout. |
|
10 |
+set keyseq-timeout 0 |
|
11 |
+ |
|
12 |
+# Force eight bit cleanliness regardless of terminal. |
|
13 |
+set input-meta On |
|
14 |
+set output-meta On |
|
15 |
+set convert-meta Off |
|
16 |
+ |
|
17 |
+# Turn off the audible bell. |
|
18 |
+set bell-style visible |
|
19 |
+ |
|
20 |
+# Prevent inadvertent execution of pasted commands. |
|
21 |
+# <http://www.xfree86.org/current/ctlseqs.html#Bracketed Paste Mode> |
|
22 |
+set enable-bracketed-paste On |
|
23 |
+ |
|
24 |
+# List certain completion matches immediately instead of ringing the bell. |
|
25 |
+# set show-all-if-ambiguous On |
|
26 |
+set show-all-if-unmodified On |
|
27 |
+ |
|
28 |
+# Use `LS_COLORS` to indicate file type when listing possible completions. |
|
29 |
+set colored-stats On |
|
30 |
+ |
|
31 |
+# Use colors to mark the common prefix during completion. |
|
32 |
+set colored-completion-prefix On |
|
33 |
+set menu-complete-display-prefix On |
|
34 |
+ |
|
35 |
+# Append slash to completed directory names even if they are symbolic links. |
|
36 |
+set mark-symlinked-directories On |
|
37 |
+ |
|
38 |
+# When in the middle of a word, do not insert characters from the completion |
|
39 |
+# that match characters after the point in the word being completed. |
|
40 |
+set skip-completed-text On |
|
41 |
+ |
|
42 |
+# Help identify matching parentheses when typing. |
|
43 |
+set blink-matching-paren On |
|
44 |
+ |
|
45 |
+# Do not echo a character corresponding to a signal generated from the |
|
46 |
+# keyboard. |
|
47 |
+set echo-control-characters Off |
|
48 |
+ |
|
49 |
+# Do not retain changes to history lines. |
|
50 |
+set revert-all-at-newline On |
|
51 |
+ |
|
52 |
+# Do not override control characters. |
|
53 |
+set bind-tty-special-chars Off |
|
54 |
+ |
|
55 |
+# Indicate vi mode with cursor shape. |
|
56 |
+set show-mode-in-prompt On |
|
57 |
+# $if term=xterm |
|
58 |
+ # https://vt100.net/docs/vt510-rm/DECSCUSR |
|
59 |
+ # http://invisible-island.net/xterm/ctlseqs/ctlseqs.html |
|
60 |
+ set vi-cmd-mode-string \1\e[1 q\2 |
|
61 |
+ set vi-ins-mode-string \1\e[5 q\2 |
|
62 |
+ set emacs-mode-string \1\e[5 q\2 |
|
63 |
+# $endif |
|
64 |
+$if term=linux |
|
65 |
+ # https://www.kernel.org/doc/Documentation/admin-guide/vga-softcursor.rst |
|
66 |
+ set vi-cmd-mode-string \1\e[?8c\2 |
|
67 |
+ set vi-ins-mode-string \1\e[?2c\2 |
|
68 |
+ set emacs-mode-string \1\e[?2c\2 |
|
69 |
+$endif |
|
70 |
+ |
|
71 |
+# Override the defaults for `previous-history` and `next-history` to use |
|
72 |
+# `history-search-backward` and `history-search-forward` instead. These take |
|
73 |
+# into account text already typed. |
|
74 |
+set keymap emacs-standard |
|
75 |
+"\e[A": history-search-backward |
|
76 |
+"\e[B": history-search-forward |
|
77 |
+"\eOA": history-search-backward |
|
78 |
+"\eOB": history-search-forward |
|
79 |
+"\C-p": history-search-backward |
|
80 |
+"\C-n": history-search-forward |
|
81 |
+set keymap vi-insert |
|
82 |
+"\e[A": history-search-backward |
|
83 |
+"\e[B": history-search-forward |
|
84 |
+"\eOA": history-search-backward |
|
85 |
+"\eOB": history-search-forward |
|
86 |
+"\C-p": history-search-backward |
|
87 |
+"\C-n": history-search-forward |
|
88 |
+set keymap vi-command |
|
89 |
+"\e[A": history-search-backward |
|
90 |
+"\e[B": history-search-forward |
|
91 |
+"\eOA": history-search-backward |
|
92 |
+"\eOB": history-search-forward |
|
93 |
+"\C-p": history-search-backward |
|
94 |
+"\C-n": history-search-forward |
|
95 |
+"k": history-search-backward |
|
96 |
+"j": history-search-forward |
|
97 |
+ |
|
98 |
+# Change vi mode `C-w` from `vi-unix-word-rubout` to the more useful |
|
99 |
+# `unix-filename-rubout`. |
|
100 |
+set keymap vi-insert |
|
101 |
+"\C-w": unix-filename-rubout |
|
102 |
+set keymap vi-command |
|
103 |
+"\C-w": unix-filename-rubout |
|
104 |
+ |
|
105 |
+# Ctrl-L clears display (including scrollback buffer). |
|
106 |
+set keymap emacs-standard |
|
107 |
+"\C-l": clear-display |
|
108 |
+set keymap vi-insert |
|
109 |
+"\C-l": clear-display |
|
110 |
+set keymap vi-command |
|
111 |
+"\C-l": clear-display |
|
112 |
+ |
|
113 |
+# Ctrl-C sends Escape. Note that `stty intr ''` probably has to be run before |
|
114 |
+# readline reads a line for Ctrl-C to reach readline. It is a good idea to |
|
115 |
+# reset it with `stty intr '^c'` after the line has been read. |
|
116 |
+set keymap vi-insert |
|
117 |
+"\C-c": "\e" |
|
118 |
+ |
|
119 |
+# `readline-vim`. |
|
120 |
+$include ~/.inputrc.d/readline-vim.inputrc |