-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.inputrc
60 lines (53 loc) · 1.62 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
# https://stackoverflow.com/a/42107711/52817
# Use Vi, not Emacs, shortcuts for editing
set editing-mode vi
set show-mode-in-prompt on
set vi-ins-mode-string \1\e[6 q\2
set vi-cmd-mode-string \1\e[2 q\2
# https://vim.fandom.com/wiki/Use_vi_shortcuts_in_terminal
# Show all completions as soon as I press tab,
# even if there's more than one
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
set menu-complete-display-prefix on
# https://cirw.in/blog/bracketed-paste
set enable-bracketed-paste on
# Keymaps for when we're in insert (i.e., typing stuff in) mode
set keymap vi-insert
# switch to block cursor before executing a command
RETURN: "\e\n"
# Pressing tab will list all completions & select the first one.
# Pressing it again will cycle through available completions.
TAB: menu-complete
# Shift-TAB cycles completions backward
"\e[Z": menu-complete-backward
ctrl-_: undo
ctrl-a: beginning-of-line
ctrl-b: backward-char
ctrl-d: delete-char
ctrl-e: end-of-line
ctrl-f: forward-char
ctrl-t: transpose-char
ctrl-h: backward-delete-char
ctrl-k: kill-line
ctrl-l: clear-screen
ctrl-n: next-history
ctrl-p: previous-history
# ctrl-u (unix-line-discard) already works
ctrl-w: backward-kill-word
# ctrl-y (yank) already works
"\e.": yank-last-arg
"\eb": backward-word
"\ec": capitalize-word
"\ed": kill-word
"\ef": forward-word
"\eh": backward-kill-word
"\el": downcase-word
"\et": transpose-words
"\eu": upcase-word
"\ey": yank-pop
# Keymaps for when we're in command mode (e.g., after hitting ESC)
# set keymap vi-command