How to use ctrl-i for an emacs shortcut without breaking tabs

Posted by mksuth on Stack Overflow See other posts from Stack Overflow or by mksuth
Published on 2010-12-22T17:52:03Z Indexed on 2010/12/22 17:54 UTC
Read the original article Hit count: 319

Filed under:
|
|

I want to redefine the emacs keyboard shortcut control-i to be "MOVE CURSOR UP"

To do this, I added the following line to my .emacs file:

(global-set-key (kbd "C-i") 'previous-line)

What I then discovered is that the tab key, by default, does whatever is bound to control-i, which is obviously not what I want. So, to restore normal tab behavior, I added this to my .emacs file

(global-set-key (kbd "<tab>") 'indent-for-tab-command)

This mostly works. BUT, tab no longer works for auto-completing commands in the mini buffer. How can I fix that? Or is there a better way of going about this? Thanks.

© Stack Overflow or respective owner

Related posts about emacs

Related posts about tabs