-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
.inputrc
125 lines (101 loc) · 2.94 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# This file controls the behaviour of line input editing for programs that use
# the GNU Readline library. Existing programs include FTP, Bash, and GDB.
#
# You can re-read the inputrc file with C-x C-r.
# Lines beginning with '#' are comments.
#
# First, include any systemwide bindings and variable assignments
$include /etc/inputrc
# Set various bindings for emacs mode
set editing-mode emacs
$if mode=emacs
Meta-Control-h: backward-kill-word
"\e[3;3~": kill-word
# # Arrow keys in keypad mode
# "\M-OD": backward-char
# "\M-OC": forward-char
# "\M-OA": previous-history
# "\M-OB": next-history
# Arrow keys in ANSI mode
"\M-[D": backward-char
"\M-[C": forward-char
"\M-[A": previous-history
"\M-[B": next-history
"\M-[A": history-search-backward
"\M-[B": history-search-forward
# # Arrow keys in 8 bit keypad mode
# "\M-\C-OD": backward-char
# "\M-\C-OC": forward-char
# "\M-\C-OA": previous-history
# "\M-\C-OB": next-history
# # Arrow keys in 8 bit ANSI mode
# "\M-\C-[D": backward-char
# "\M-\C-[C": forward-char
# "\M-\C-[A": previous-history
# "\M-\C-[B": next-history
"\C-q": quoted-insert
$endif
# An old-style binding, this happens to be the default
TAB: menu-complete
"\e[Z": menu-complete-backward
# Macros that are convenient for shell interaction
$if Bash
# Edit the path
"\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
# Insert open and close double quotes and move to just after the open quote
"\C-x\"": "\"\"\C-b"
# Insert a backslash (testing backslash escapes in sequences and macros)
"\C-x\\": "\\"
# Quote the current or previous word
"\C-xq": "\eb\"\ef\""
# Add a binding to refresh the line, which is unbound
"\C-xr": redraw-current-line
# Edit variable on current line
"\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
$endif
# Python
$if Python
$endif
# Mappings for ctrl-left and ctrl-right for word moving
"\e[1;5C": forward-word
"\e[1;5D": backward-word
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
# Adds punctuation as word delimiters
set bind-tty-special-chars off
# Use a visible bell if one is available
set bell-style none
# Useful stuff for UTF-8
set meta-flag on
# Don't strip characters to 7 bits when reading
set input-meta on
# Allow iso-latin1 characters to be inserted rather than converted to
# prefix-meta sequences
set convert-meta off
# Display characters with the eighth bit set directly rather than as
# meta-prefixed characters
set output-meta on
# If there are more than 150 possible completions for a word, ask the user if he
# wants to see all of them
set completion-query-items 150
# Completion Options
set page-completions on
set completion-ignore-case on
set show-all-if-ambiguous on
set show-all-if-unmodified on
set menu-complete-display-prefix on
set visible-stats on
set match-hidden-files off
set skip-completed-text on
# Color Options
set colored-completion-prefix on
set colored-stats on
# For FTP
$if Ftp
"\C-xg": "get \M-?"
"\C-xt": "put \M-?"
"\M-.": yank-last-arg
$endif
set keymap emacs