Browse code

inputrc - v0.1 - Binding for word deletion

Fred authored on02/10/2016 21:46:11
Showing1 changed files
... ...
@@ -1,8 +1,8 @@
1 1
 # Title: .inputrc
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 0.0
3
+# Version: 0.1
4 4
 # Created in: 2016-02-28
5
-# Modified in:
5
+# Modified in: 2016-10-02
6 6
 
7 7
 
8 8
 
... ...
@@ -19,6 +19,7 @@
19 19
 # Versions #
20 20
 #==========#
21 21
 
22
+# v0.1 - 2016-10-02: key binding for word deletion added
22 23
 # v0.0 - 2016-02-28: creation
23 24
 
24 25
 
... ...
@@ -34,7 +35,6 @@ set output-meta on
34 35
 # To allow the use of 8bit-characters like the german umlauts, uncomment
35 36
 # the line below. However this makes the meta key not work as a meta key,
36 37
 # which is annoying to those which don't need to type in 8-bit characters.
37
-
38 38
 # set convert-meta off
39 39
 
40 40
 # Try to enable the application keypad when it is called.  Some systems
... ...
@@ -74,15 +74,15 @@ $if mode=emacs
74 74
 "\e[3~": delete-char
75 75
 "\e[2~": quoted-insert
76 76
 
77
-# Mappings for "page up" and "page down" to step to the beginning/end of the history
77
+# Mappings for stepping to the beginning/end of the history with Page-up and Page-down
78 78
 "\e[5~": beginning-of-history
79 79
 "\e[6~": end-of-history
80 80
 
81
-# Alternate mappings for "page up" and "page down" to search the history
81
+# Mappings for searching the history with Ctrl-up-arrow and Ctrl-down-arrow
82 82
 "\e[1;5A": history-search-backward
83 83
 "\e[1;5B": history-search-forward
84 84
 
85
-# Mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
85
+# Mappings for moving around words with Ctrl-left-arrow and Ctrl-right-arrow
86 86
 "\e[1;5C": forward-word
87 87
 "\e[1;5D": backward-word
88 88
 "\e[5C": forward-word
... ...
@@ -90,6 +90,10 @@ $if mode=emacs
90 90
 "\e\e[C": forward-word
91 91
 "\e\e[D": backward-word
92 92
 
93
+# Mappings for deleting whole words with Ctrl-delete and Ctrl-backspace
94
+"\e[3;5~": kill-word
95
+"\C-_": backward-kill-word
96
+
93 97
 $if term=rxvt
94 98
 "\e[8~": end-of-line
95 99
 "\eOc": forward-word