-
Notifications
You must be signed in to change notification settings - Fork 7
/
.inputrc
97 lines (82 loc) · 2.17 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# ~/.inputrc
# be 8 bit clean
set input-meta on
set output-meta on
# do not strip 8th bit
set convert-meta off
# meta okey
set meta-flag on
# do not bell on TAB completion
set bell-style none
# disable application keypad (it is enabled in PUTTY and with this set as 'off' it sort of 'just works')
set enable-keypad off
# ignore case on TAB-completion
set completion-ignore-case On
# vi mode when editing
set editing-mode vi
# KEYMAPPINGS for xterm mode (PUTTY/ssh)
$if term=xterm
# "\e" is the ESC sequence => ^[
# type C-v and press any <key> or a combination of <key>s to see its code
# Home/End
"\e[1~": beginning-of-line
"\e[4~": end-of-line
# Delete/Insert
"\e[3~": delete-char
"\e[2~": quoted-insert
# PageUp/PageDown
"\e[5~": history-search-backward
"\e[6~": history-search-forward
# Alt+Left/Alt+Right
"\e\e[C": forward-word
"\e\e[D": backward-word
"\e[1;3C": forward-word
"\e[1;3D": backward-word
# Ctrl+Left/Ctrl+Right
"\eOC": forward-word
"\eOD": backward-word
"\e[1;5C": forward-word
"\e[1;5D": backward-word
$endif
# KEYMAPPINGS for vi mode
$if mode=vi
# INSERT MODE
set keymap vi-insert
"\C-a": beginning-of-line
"\C-e": end-of-line
"\C-k": kill-line
"\C-l": clear-screen
"\C-p": history-search-backward
"\C-n": history-search-forward
"\C-r": reverse-search-history
"\C-s": forward-search-history
"\C-u": unix-line-discard
"\C-w": unix-word-rubout
"\C-y": yank
"\C-_": undo
"\eb": backward-word # alt-b
"\ed": kill-word # alt-d
"\ef": forward-word # alt-f
# COMMAND MODE
set keymap vi-command
"\C-a": beginning-of-line
"\C-e": end-of-line
"\C-h": delete-char
"\C-k": kill-line
"\C-l": clear-screen
"\C-p": history-search-backward
"\C-n": history-search-forward
"\C-r": reverse-search-history
"\C-s": forward-search-history
"\C-u": unix-line-discard
"\C-w": unix-word-rubout
"\C-y": yank
"\C-_": undo
"\eb": backward-word # alt-b
"\ed": kill-word # alt-d
"\ef": forward-word # alt-f
"\e[A": history-search-backward # up-arrow
"\e[B": history-search-forward # down-arrow
"\e[5~": history-search-backward # pg-up
"\e[6~": history-search-forward # pg-down
$endif