-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinputrc
69 lines (48 loc) · 1.58 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
set editing-mode vi
set show-mode-in-prompt on
#set vi-ins-mode-string "+"
#set vi-cmd-mode-string ":"
set keymap vi-command
set show-all-if-ambiguous on
# Ignore case
set completion-ignore-case on
# on menu-complete, first display the common prefix, then cycle through the
# options when hitting TAB
# menu-complete-display-prefix on
$if mode=vi
#======================================================================
set keymap vi-command
"gg": beginning-of-history
"G": end-of-history
# Insert the arguments from the last command
"\C-P": "i !!*"
"\C-p": "a $(!!)"
#======================================================================
set keymap vi-insert
"jk": vi-movement-mode
# Insert the arguments from the last command
"\C-b": "!!*"
"\C-p": "$(!!)"
# Needed because binding 'p' in command mode above wipes its insert mode
# function, too. This fixes that, and will insert 'p' when you type 'p'.
#"p": self-insert
#"r": self-insert
#
# #cycle thru completions.
# "\e/": menu-complete
#
# # wrap previous command in $() and edit beginning of line
# "\C-w": '\e-I $(\eA)\eI'
#
# # Edit options before rerunning previous command, eg: ls a b c -> ls -al a b c
# "\C-o": "\e-0eli "
#
#
# # vim style history search
# "\e[A": history-search-backward
# "\e[B": history-search-forward
$endif
# return to previous directory
#"\ez": 'cd -\015'
# TODO - read and understand more of what I can do here.
# https://www.reddit.com/r/commandline/comments/e6l5l/short_guide_to_custom_bashreadline_key_bindings/