-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.inputrc
35 lines (34 loc) · 1022 Bytes
/
.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
# match vim cmdline behavior
set editing-mode vi
"\C-x\C-r": re-read-init-file
set completion-ignore-case on
set show-mode-in-prompt on
set show-all-if-ambiguous on
set vi-ins-mode-string \1\e[35m\2+\1\e[0m\2
set vi-cmd-mode-string \1\e[33m\2:\1\e[0m\2
$if mode=vi
# normal mode
set keymap vi-command
"j": beginning-of-history
"h": backward-char
"l": forward-char
"G": end-of-history
# insert mode
set keymap vi-insert
"jj": vi-movement-mode
# C-f is used for going forward; since very rarely used bind to c-x-e used more frequnetly
"\C-f":edit-and-execute-command
# up arrow
"\e[A":history-substring-search-backward
# down arrow
"\e[B":history-substring-search-forward
# expand aliases
"\C-\M-e": shell-expand-line
"\e.":insert-last-argument
"\C-g*": glob-expand-word
"Tab": menu-complete
$else
# Use up and down arrows to search history
"\e[A": history-substring-search-backward
"\e[B": history-substring-search-forward
$endif