-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot-inputrc
86 lines (66 loc) · 1.91 KB
/
dot-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
83
84
85
86
# .inputrc: configures gnu's readline program
# controls keyboard interaction with the shell at command-line
#
# To source this file:
# bind -f {thefilename}
# To know the list of functions, bound or not
# bind -p | less
# Mini-reference of some functionality:
# - "\C-x\C-u": undo
# - "\e#": insert-comment
# - "\C-s": forward-search-history
# - "\C-r": reverse-search-history
# - "\et": transpose-words
# - restore a binding: self-insert
# Control-u: kill-whole-line
# Home: beginning-of-line
# Use vi mode.
set editing-mode vi
# Configuration options:
set bell-style none
set colored-completion-prefix on
set colored-stats on
set expand-tilde on
set mark-modified-lines on
set show-all-if-unmodified on
set visible-stats on
# enable 8-bit characters..
set meta-flag on
set convert-meta off
set output-meta on
#set show-mode-in-prompt on
#set vi-ins-mode-string "+"
#set vi-cmd-mode-string ":"
set show-mode-in-prompt on
set vi-ins-mode-string " "
set vi-cmd-mode-string "\1\e[101m\2 \1\e[0m\2"
# Use C-l in insert mode to clear the screen (it only works in normal mode
# otherwise).
"\C-l":clear-screen
"\C-x\C-f":complete-filename
# Moving around
"\e[1;5C": forward-word
"\e[1;5D": backward-word
# Ctrl+Backspace/Delete to delete whole words
"\e[3;5~": kill-word
"\C-_": backward-kill-word
# Ctrl+Shift+Backspace/Delete to delete to start/end of the line
"\e[3;6~": kill-line
"\xC2\x9F": backward-kill-line # for UTF-8
#"\x9F": backward-kill-line # for ISO-8859-x
#"\e\C-_": backward-kill-line # for any other charset
# Insert "$()" around current line
"\e\C-m": '\C-a"$(\C-e)"'
# CTRL+up/down: navigate search history
"\e[1;5A": history-search-backward
"\e[1;5B": history-search-forward
# Insert " 2>&1"
"\e2": '2>&1'
# Append " | less"
"\el": '\C-e | less -X'
# Prepend "less"
"\eL": '\C-aless '
# Find
"\eF": '\C-afind . -name '
# append "| awk /pattern/ {print $42}"
"\ea": '\C-e | awk \'/pattern/ {print $42}\''