-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.inputrc
52 lines (38 loc) · 1.06 KB
/
.inputrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# No idea what this is for actually
#set meta-flag on
set editing-mode vi
# these 3 are already set by /etc/inputrc
set input-meta on
set convert-meta off
set output-meta on
# home/end
"\e[1~": beginning-of-line
"\e[4~": end-of-line
# ctrl arrow word hop
"\e[1;5C": forward-word
"\e[1;5D": backward-word
# alt arrow word hop
"\e[1;3C": forward-word
"\e[1;3D": backward-word
# searches!
"\e[A":history-search-backward
"\e[B":history-search-forward
# Ctrl+Del to killword
# ^[ is equivalent to \e, but somehow the "^[[3;5~" version
# doesn't seem to work for me.
"\e": backward-kill-word
"\e[3;5~": kill-word
# "": backward-delete-char
# Very sad to say that Ctrl+Backspace is a special case and can't be done
# with inputrc alone :(
set show-all-if-ambiguous on
set completion-ignore-case on
$if Bash
Space: magic-space
$endif
# Note these require bash 4.4 or later but seem harmless on ancient bashs
set show-mode-in-prompt on
set vi-ins-mode-string "\1\e[6 q\2[INSERT] "
set vi-cmd-mode-string "\1\e[2 q\2[NORMAL] "
set keymap vi-insert
"\e.":yank-last-arg