-
Notifications
You must be signed in to change notification settings - Fork 1
/
inputrc
60 lines (48 loc) · 1.5 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
$include /etc/inputrc
# Only one <Tab> required to show a list of all completions
set show-all-if-ambiguous on
set show-all-if-unmodified on
# Show extra file information when completing, like `ls -F` does
set visible-stats on
# Color completions with LS_COLORS, similar to ls
set colored-stats on
# Make completion case-insensitive
set completion-ignore-case on
# When matching filenames, treat '_' and '-' as equivalent
set completion-map-case on
# Immediately add a trailing slash when completing symlinks to directories
set mark-symlinked-directories on
# Common prefixes greater than this value are replaced ellipsis
set completion-prefix-display-length 4
# Smarter completion when in the middle of a word
set skip-completed-text on
# Pasted code is not run automatically
set enable-bracketed-paste on
# Turn on vi mode
set editing-mode vi
# Vi mode keymaps
$if mode=vi
set keymap vi-command
"gg": beginning-of-history
"G": end-of-history
"\C-a": beginning-of-line
"\C-e": end-of-line
set keymap vi-insert
"\C-l": clear-screen
"\C-w": backward-kill-word
# "\C-p": history-search-backward
"\C-a": beginning-of-line
"\C-e": end-of-line
$endif
# Vi mode strings
$if Bash
set show-mode-in-prompt on
$if term=linux
set vi-ins-mode-string \1\e[34;1m\2+\1\e[0m\2
set vi-cmd-mode-string \1\e[35;1m\2:\1\e[0m\2
$else
set vi-ins-mode-string \1\e[6 q\e[34;1m\2+\1\e[0m\2
set vi-cmd-mode-string \1\e[2 q\e[35;1m\2:\1\e[0m\2
$endif
$else
$endif