-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.inputrc
82 lines (66 loc) · 2.19 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
set colored-stats on
set colored-completion-prefix on
set skip-completed-text on
set show-all-if-ambiguous on
set show-all-if-unmodified on
set completion-ignore-case on
set match-hidden-files off
# # If there are more than 200 possible completions for a word, ask to show them all
set completion-query-items 200
set completion-prefix-display-length 2
# Make keyseq-timeout lower to enable faster switching between
# vi Normal and Insert mode
set keyseq-timeout 50
set editing-mode vi
set show-mode-in-prompt on
set vi-cmd-mode-string " "
set vi-ins-mode-string
$if mode=vi
set keymap vi-command
# these are for vi-command mode
Control-l: clear-screen
## arrow up
"\e[A": history-search-backward
## arrow down
"\e[B": history-search-forward
## set home and end key functionality
"\e[1~": beginning-of-line
"\e[4~": end-of-line
# Pressing tab will list all completions & select the first one. Pressing it
# again will cycle through available completions.
Control-k: menu-complete
# Shift-TAB cycles completions backward
Control-j: menu-complete-backward
"\ef": shell-forward-word
"\eb": shell-backward-word
"\et": "if [[ $(ps -e | grep tmux | wc -l) == 0 ]]; then tmux -2; else tmux -2 attach; fi\015"
# glob patterns without executing, eg: 'rm *x'
"\ee": glob-expand-word
# Expand variables like ~ and $USER to their values
Control-e: shell-expand-line
# V normally opens the command in an editor.. a bit frustrating
v: ""
set keymap vi-insert
# these are for vi-insert mode
Control-l: clear-screen
## arrow up
"\e[A": history-search-backward
## arrow down
"\e[B": history-search-forward
## set home and end key functionality
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\ef": shell-forward-word
"\eb": shell-backward-word
# Pressing tab will list all completions & select the first one. Pressing it
# again will cycle through available completions.
Control-k: menu-complete
# Shift-TAB cycles completions backward
Control-j: menu-complete-backward
"\et": "if [[ $(ps -e | grep tmux | wc -l) == 0 ]]; then tmux -2; else tmux -2 attach; fi\015"
# glob patterns without executing, eg: 'rm *x'
"\ee": glob-expand-word
# Expand variables like ~ and $USER to their values
Control-e: shell-expand-line
$endif
set keymap vi