In emacs, I want to bind a command to C-i. So I put (global-set-key "\C-i" 'forward-word)
in my .emacs file. This works, except now the TAB key is bound to ‘forward-word as well.
How do I bind a command to C-i without changing TAB?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In short, this should solve the problem for you:
Longer version:
From the emacs lisp documentation on function keys:
So, once you do the following, you can see the difference in the key bindings:
Note, each mode sets up the various TAB bindings differently, so you may need to do customization per mode that you care about.
Version Dependency:
The above works for Emacs 23.1. From the NEWS file:
Which means, in versions 22 and earlier, you can get the same effect by using the variable
function-key-map. I tested this and found it to work with Emacs 21.