-
Notifications
You must be signed in to change notification settings - Fork 4
/
.inputrc
executable file
·69 lines (55 loc) · 1.88 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
# base-files version 3.9-3
# Bind the up arrow to history search, instead of history step
"\e[A": history-search-backward
# And the reverse (down)
"\e[B": history-search-forward
# the following line is actually
# equivalent to "\C-?": delete-char
"\e[3~": delete-char
# VT
"\e[1~": beginning-of-line
"\e[4~": end-of-line
# kvt
"\e[H": beginning-of-line
"\e[F": end-of-line
# rxvt and konsole (i.e. the KDE-app...)
"\e[7~": beginning-of-line
"\e[8~": end-of-line
# VT220
"\eOH": beginning-of-line
"\eOF": end-of-line
# Stoppy beepy
set bell-style none
# to show all characters like å
set meta-flag On
set input-meta On
set output-meta On
set convert-meta Off
# Vim mode in bash with cursor improvements. Zsh has different instructions
# First upgrade to Bash 4 on OSX http://clubmate.fi/upgrade-to-bash-4-in-mac-os-x/
# Then add the following lines to your ~/.inputrc:
# Turn on vim mode in bash (and other CLIs, like postgres!). Doesn't work for
# node, ruby, but works for python
set editing-mode vi
# Show the current mode (insert/command) in the bash prompt
set show-mode-in-prompt on
# Cursor options:
# 0 -> blinking block.
# 1 -> blinking block (default).
# 2 -> steady block.
# 3 -> blinking underline.
# 4 -> steady underline.
# 5 -> blinking bar (xterm).
# 6 -> steady bar (xterm).
# Bash colors: https://misc.flogisoft.com/bash/tip_colors_and_formatting
# Set the cursor and prompt prefix for insert and command mode.
# Explanation:
# \1\e[ Some nonense escape code
# 6 The option from above
# q\2 (with leading space) more nonense escape code
# I removed the following because it messes up line wrapping
# \e[91m The color of the thing to show in front of prompt (light red)
# i The text to put in front of the cursor
# \e[0m Reset color code (to be a good citizen)
set vi-ins-mode-string \1\e[5 q\2
set vi-cmd-mode-string \1\e[2 q\2