remove kinsis / unused input settings
[distro-setup] / .inputrc
1 # case insensitive completion
2 set completion-ignore-case on
3 # - to _ insensitive completion
4 set completion-map-case on
5
6 # todo: explain this :)
7 set menu-complete-display-prefix on
8
9 # for readline-complete.el
10 set bell-style none
11 set completion-display-width 0
12
13 # preserve cusror location in history items.
14 # unfortunately, this does not work when using vi-mode and j or k
15 # I would like to make a patch to fix this.
16 set history-preserve-point on
17
18
19 # show all completions all the time
20 set show-all-if-ambiguous on
21 # this does a partial complete if it can before showing completions
22 set show-all-if-unmodified on
23
24
25 # nice in bash, but messes up completion in emacs shell
26 #set visible-stats on
27 set visible-stats off
28
29 # turn off pager for completion
30 set page-completions off
31
32 # to answer this question in bash-completion README:
33 # Q. When completing on a symlink to a directory, bash does not append
34 # the trailing / and I have to hit <Tab> again. I don't like this.
35 set mark-symlinked-directories on
36
37 # i had this set in the past to make c-u work, but it doesn't seem to be needed now.
38 # not sure if it affected any other keybinds.
39 #set bind-tty-special-chars off
40
41
42
43 # key bindings:
44
45 # note c-i/m/h are unusable, duplicating tab, enter, ctrl-del or something
46 # C-x would be hard to rebind because emacs.
47
48 "\C-q": exchange-point-and-mark
49 # default not bound
50 "\C-w": kill-region
51 # default M-S-3
52 "\C-a": insert-comment
53
54 # default is C-M-y
55 "\e,": yank-nth-arg
56
57 "\C-f": menu-complete
58 "\C-b": menu-complete-backward
59
60 # arrow keys. for other terminals, see http://unix.stackexchange.com/questions/10806/how-to-change-previous-next-word-shortcut-in-bash
61 # this can be conditioned based on the term, see the term keyword in
62 # bash's readline manual section
63 #"\eOc": forward-word
64 #"\eOd": backward-word
65 "\e[1;5C": forward-word
66 "\e[1;5D": backward-word
67
68 Control-Space: set-mark
69
70 # default is C-M-e which kinda sucks
71 "\C-t": shell-expand-line
72
73 # ctrl-delete
74 "\e[3;5~": kill-word
75
76 # default is C-x C-e
77 "\C-g": edit-and-execute-command
78
79 # default is C-y
80 "\C-v": yank
81
82 # default is C-M-y
83 "\C-\M-v": yank-pop
84
85 # by default, not bound
86 "\C-p": dabbrev-expand # similar menu-complete, except for commands in history
87
88 # default is C-q. this matches emacs.
89 "\C-\M-q": quoted-insert
90
91 # default is C-x C-u
92 "\C-d": undo
93
94
95
96
97
98
99
100
101
102 ####### commented out stuff ###########
103
104 # vi mode settings and observatoins
105 # double pound indicates it is only commented because I am not using vi mode
106 ##set editing-mode vi
107
108 # completion from history. how cool
109 ##Control-SPACE: dynamic-complete-history
110
111 # this is just kinda cool to show off:
112 ##"\M-{": complete-into-braces
113
114
115 # by default / and ? do a non-incremental search. This changes that.
116 # the downside is that you have to type ctrl-v then / to get the actual char.
117 ##set keymap vi-command
118 ##"/": reverse-search-history
119 ##"?": forward-search-history
120 # make g go to the end of history. emacs has some meta key for this,
121 # but we are not using g, so why not.
122 ##"g": end-of-history
123 # yank-pop from emacs mode, hacked into vim-mode.
124 ##"o": vi-yank-pop
125 # vim uses m<letter> to set a mark and `<letter> to return to a mark specified
126 # by letter. On a single line, this doesn't make much sense. So I'm using the
127 # emacs way of a single mark. In vi-mode, you can do dm<letter> to delete a
128 # mark. Emacs has its own delete and copy region commands. I'd like to hack the
129 # source code to make d` delete to the mark and y` yank to the mark. I'm
130 # leaving it for now, we will see how this works out in actual emacs when I get
131 # my vi keybinds setup there.
132 ##"`": exchange-point-and-mark
133 ##"v": set-mark
134 ##"m": kill-region
135 ##"-": yank-last-arg
136 ##"_": yank-nth-arg
137
138
139
140 # w and b are normally always tripping over punctuation as word separators, I
141 # think having W and B act like that is a bit more efficient default. And this
142 # "shell" functions see words as the shell does, which is cool.
143 # These are also only included as bash commands.
144 # this is enables in .bashrc, after testing if bash version is > 4
145 # "b": shell-backward-word
146 # "w": shell-forward-word
147 # here we are with the unwrapped word, back and end functions, (that should get fixed).
148 #"w": vi-fWord
149 #"W": vi-fword
150 #b: vi-bWord
151 #B: vi-bword
152 #"e": vi-eWord
153 #"E": vi-eword
154 #
155 #unfortunately thre is another bug: binding for example W to vi-fword makes it
156 #show that its bound to that and also vi-fWord, and the upper case one is what
157 # word.now
158 #happens
159 #
160 # I added a hack to the readline sources to reverse the upper/lowercase check on these
161
162 # I would like to make a patch to make the command 'shell-end-word'
163
164
165
166 # for some reason, binding the '=' key doesn't work.
167
168 # for some reason, the documentation of the same commands seems to be more
169 # extensive in bash. There are extra commands listed in the bash documentation
170 # too, but so far they seem to be shell specific.
171
172 # "p": yank
173 #set keymap vi-insert
174 #
175 #notes:
176 #
177 #normal mode has this, which doesn't make sense. 'i' still works fine. whatever.
178 # vi-insertion-mode (not bound)
179 #
180 # normal mode default keybinds also have this:
181 # vi-fword (not bound)
182 # vi-fWord (not bound)
183 #
184 # vi-bword (not bound)
185 # vi-bWord (not bound)
186 #
187 # Looking in the readline sources, those are the real forward and back
188 # commands, but they are wrapped in this: and its corresponding back version.
189 # "W": vi-next-word
190 # "w": vi-next-word
191 # What this wrapper does is check for upper/lower case, do terminal ding if its
192 # at the eol, and handle negative counts prefixed to it.
193 #
194 # This command:
195 # "_": vi-yank-arg
196 # works like this emacs command:
197 # yank-last-arg
198 # except it puts you in insert mode afterwards, so you can't make successive
199 # calls to go to earlier last arguments.
200 #
201 # Emacs has a kill ring. yank means paste. yank-pop means go down the kill
202 # ring, this only has an effect after a yank, or a yank-pop that was after a
203 # yank. Vim also has a kill ring plugin, that has a yank-pop, and a yank-push,
204 # to browse forward in the kill ring. In emacs there is no forward function,
205 # you simply undo the yank. In bash vi-mode, undoing the yank undoes it
206 # entirely, not each item in the kill ring. This isn't a big deal. In both
207 # emacs and vi-mode, the kill ring stays in the new position regardless of the
208 # undo. Vi-mode does not allow you to yank-pop after the vi pastes 'p' and 'P',
209 # 1 problem is the cursor is in a little different position than an emacs yank.
210 # I think I can modify the readline sources fairly easily to make this
211 # possible.
212 # There is an interesting incompatibility between vi and emacs mode. Emacs mode
213 # always has the block be 1 square after the cursor. Same in vi-insert, but in
214 # vi-normal, its on top of the character and can't go beyond the last
215 # character, so if you do a yank at the last character in vi-normal, it does
216 # not put the cursor after the last character like a normal yank because it
217 # cant, and then you can't yank-pop because the cursor is in the wrong spot.
218 #
219 #