Wednesday, January 12, 2011

Unable to have a Vim-like keybinding in Emacs

I want to replace the command for moving between windows in Emacs to

Ctrl-t

The command in pseudo-code

(global-set-key "\C-moveBetweenWindows" 'C-t)

How can you remap the command for moving between windows in Emacs?

  • In your ~/.emacs file, include the following line:

    (global-set-key "\C-t" 'other-window)
    

    This will set Ctrl-t (C-t) to move to the next window just like the C-x o key sequence. This will replace the transpose-chars key binding, which you could set to something else if you wanted.

0 comments:

Post a Comment