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?

Answer

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.

Attribution
Source : Link , Question Author : Léo Léopold Hertz 준영 , Answer Author : Dennis Williamson

Leave a Comment