forked from netj/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.inputrc
94 lines (72 loc) · 2.59 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# netj's READLINE configuration
# Author: Jaeho Shin <[email protected]>
# Overhauled: 2013-01-13
# enhanced options
set completion-ignore-case On
set completion-map-case On
set visible-stats On
set colored-stats On
set mark-symlinked-directories On
#set mark-modified-lines On
set skip-completed-text On
# Vim-like menu-complete (set wildmode=list:full wildchar=<Tab>)
set show-all-if-ambiguous On
set show-all-if-unmodified Off
set menu-complete-display-prefix Off
Tab: menu-complete
set completion-query-items -1 # without disabling this, menu-complete may not work when there are too many possible completions
# a la <S-Tab>, <C-L> and <C-D>
# XXX menu-complete-backward is available for bash >= 4
#"\e[Z": menu-complete-backward
# So here's a workaround, see: http://brettterpstra.com/2011/09/25/quick-tip-some-inputrc-fun/
"\e[Z": "\e-1\C-i"
"\e\C-d": possible-completions
"\e\C-l": complete
## Menu complete with Meta-s/S
#"\es": menu-complete
#"\eS": menu-complete-backward
# Universal argument
"\e\C-u": universal-argument
# incremental history search, both reverse and forward with Ctrl-r/]
"\C-r": reverse-search-history
"\C-]": forward-search-history
# often, Ctrl-s (default for forward search) is usually masked by tty's STOP
# moreover, things like "\e\C-r" reset the isearch keyword
# so, overriding Ctrl-] (default character-search) seems to be the best choice
# better history search with Arrow keys: Up/Down
"\e[A": history-search-backward
"\e[B": history-search-forward
# character search with Meta-] and Ctrl-Meta-]
"\e]": character-search
"\e\C-]": character-search-backward
# backward/forward words by space with Meta-Shift-B/F
"\eB": "\C-b\e\C-] \C-f"
"\eF": "\e] "
"\e^": delete-horizontal-space
# easier backward/forward path components with Meta-Ctrl-B/F
"\e\C-b": "\C-b\e\C-]/\C-f"
"\e\C-f": "\e]/"
# Quickly repeat last history item
"\e\C-m": "\C-p\C-m"
# Bash-specific READLINE Tweaks
# See-Also: http://www.ukuug.org/events/linux2003/papers/bash_tips/
$if Bash
# Do history expansion ! when space is pressed
"\C-Space": magic-space
# Insert-Option Macro (enhanced to handle multi-word commands)
"\eo": "\C-p\C-a\eF\C-f"
"\eO": "\eo\eF\C-f"
# a better backward/forward words by space with Meta-Shift-B/F
"\eviB": vi-bWord
"\eviW": vi-fWord
"\eviE": vi-eWord
"\eB": "\eviB"
"\eF": "\C-f\eviE\C-f"
# backward/forward shell words by Meta-Left/Right
"\e\e[D": shell-backward-word
"\e\e[C": shell-forward-word
# and a kill too
"\eH": shell-backward-kill-word
"\eD": shell-kill-word
$endif
$include ~/.input_local