-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinputrc
74 lines (60 loc) · 2.43 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
# Use Vi, not Emacs, style editing
# This will affect all programs using readline lib (bash, mysql etc)
# If only bash has to be set up, delete this file and add
# set -o vi
# in .bashrc
# Bash specific:
# !!! To return from / (aka history search) press c-g. Havent found a way to return with ESC.
# TODO impement dH and dL using "set keymap vi-move"
# TODO maybe find a way to change cursor to bar and back upon entering/exiting insert mode
set editing-mode vi
# # Be 8 bit clean.
# set meta-flag on
# set input-meta on
# set output-meta on
# set convert-meta off
# set editing-mode vi (already on)
# Completion suggestions in color. Possibly needs LS_COLORS env variable to provide color definitions
set colored-stats on
# 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
# Treat - and _ as equivalent
set completion-map-case on
# on menu-complete, first display the common prefix, then cycle through the
# options when hitting TAB
set menu-complete-display-prefix on
# Timeout for key sequences (default is 500, my vim's is 300, so lets match it)
set keyseq-timeout 400
# At beginning of line display the mode: @ for emacs, : for vi command, + for vi insert
set show-mode-in-prompt on
###########################################################
# Keymaps for when we're in command mode (e.g., after hitting ESC)
set keymap vi-command
# Control-x: re-read-init-file
Control-j: beginning-of-line
Control-b: beginning-of-line
Control-k: end-of-line
Control-e: end-of-line
###########################################################
# just reminding useful defaults:
# c-r reverse-search-history ( incremental search )
# c-s forward-search-history ( incremental search ) TODO remap to c-f right below c-r
###########################################################
# Keymaps for when we're in insert (i.e., typing stuff in) mode
set keymap vi-insert
Control-j: beginning-of-line
Control-k: end-of-line
## Pressing tab will list all completions & select the first one. Pressing it
## again will cycle through available completions.
# replace with `TAB: menu` for regular non-cycling menu
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
Control-p: history-search-backward
Control-n: history-search-forward