Last edit
Sammanfattning: deleted discussion of the unrelated windmove package (the deleted information is present on the appropriate page).
Deleted:
< Winner Mode can create some (possibly) more convenient window movement bindings -- `S-right', `S-left', `S-up', `S-down' -- with this:
< (windmove-default-keybindings)
< [new]
< The problem with (windmove-default-keybindings) is that they clash with the more common use on modern systems of S-right etc for selecting text. In Emacs this is turned on by CuaMode for example. Therefore it might be better to go with the alternative
< (windmove-default-keybindings 'meta)
Winner Mode is part of GNU Emacs since version 20.
Winner Mode is a global minor mode. When activated, it allows to “undo” (and “redo”) changes in the window configuration with the key commands ‘C-c left’ and ‘C-c right’. In versions previous to Emacs 22, these keybindings used to be ‘C-x left’ and ‘C-x right’.
Activate it with ‘M-x winner-mode RET’ or add the following to your ~/.emacs:
(when (fboundp 'winner-mode)
(winner-mode 1))The ‘fbound’ test is for those XEmacs installations that don’t have winner-mode available.
Winner Mode is great when you depend a lot on working with Emacs windows. To read code, you want one window. To compare it with another file, you want two windows, when on IRC you want six windows, while engaging in an important discussion, you want just one window, etc. Getting from many windows to one window is easy – ‘C-x 1’ will do it. But getting back to the delicate WindowConfiguration is difficult. This is where Winner Mode comes in: With it, going back to a previous session is easy.
winner-mode in the latest (2011-04-02 at least) breaks highlighting of spelling errors using flyspell-mode. Disabling winner-mode returns flyspell-mode functionality
Fixed as far as I can tell at least in 2011-04-08
In XEmacs similar functionality can be achieved with pop-window-configuration & unpop-window-configuration commands