Windmove is a library built into GnuEmacs starting with version 21. It lets you move point from window to window using Shift and the arrow keys. This is easier to type than
‘C-x o’ and, for some users, may be more intuitive. To activate all these keybindings, add the following to your InitFile:
(when (fboundp 'windmove-default-keybindings) (windmove-default-keybindings))
‘fbound’ test is for those XEmacs installations that don’t have the windmove package available.
This will override
‘M-right’ but these are duplicated by
‘C-right’ which are probably more natural for a CuaMode user.
Some terminals do not support modified arrow keys. To use a prefix instead of a modifier, add something like the following to your InitFile.
(global-set-key (kbd "C-c <left>") 'windmove-left) (global-set-key (kbd "C-c <right>") 'windmove-right) (global-set-key (kbd "C-c <up>") 'windmove-up) (global-set-key (kbd "C-c <down>") 'windmove-down)
See WindowNavigation for a similar piece of code, but written from scratch.
If you want to use windmove on XEmacs, please read:
→ Is possible to make windmove jump between frames?
Yes. To jump between frames, see FrameMove (which can integrate seamlessly with windmove).
Look also at
‘M-x next-multiframe-window’ command and possibly bound it to a handy keybinding! There also exists:
‘M-x previous-multiframe-window’, so it will be better than the default: `other-window` (C-x 5 o).