-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinputrc
More file actions
56 lines (48 loc) · 1.95 KB
/
inputrc
File metadata and controls
56 lines (48 loc) · 1.95 KB
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
####################################################################################################
# readline Configuration by Chloe Adeline
#
# A Vim-like readline experience! I use the Colemak keyboard layout with HNEI arrows instead of
# HJKL, K instead of N for searching, etc. Places where my own Colemak-Vim bindings are used mention
# "Colemak" in the comments.
####################################################################################################
# Use Vi, not Emacs, style editing
set editing-mode vi
# Show all completions on tab.
set show-all-if-ambiguous on
set completion-ignore-case on
# On menu-complete, display the common prefix, then cycle through the options with tab.
set menu-complete-display-prefix on
####################################################################################################
# Vi Command Mode Keymaps
####################################################################################################
set keymap vi-command
# Colemak
"h": backward-char
"n": next-history
"e": previous-history
"i": forward-char
"s": vi-insertion-mode
"S": vi-insert-beg
# TODO: k/K aren't working for me right now.
"k": vi-search-again
"K": vi-search-again
"u": undo
# readline doesn't have redo. Wat?!
"l": vi-first-print
"L": end-of-line
"j": vi-end-word
"J": vi-end-word
# Option-Up/Option-Down cycles through history that begins with the current prefix.
"\e\e[A": history-search-backward
"\e\e[B": history-search-forward
####################################################################################################
# Vi Insert Mode Keymaps
####################################################################################################
set keymap vi-insert
# Tab lists all completions and selects the first one.
TAB: menu-complete
# Shift-Tab cycles completions backward
"\e[Z": menu-complete-backward
# Option-up/option-down should also apply to insert mode
"\e\e[A": history-search-backward
"\e\e[B": history-search-forward