Winner Mode

In my Two From Phil post I mentioned that Phil had urged me to try winner-mode and that I was going to give it a try. For those who came in late, winner-mode captures the current window configuration and allows you to restore it after it gets changed by some Emacs action.

I was a little skeptical but I enabled winner-mode and 10 minutes later I was hopelessly addicted. This all comes at a good time because I have lately been setting Emacs to be 162 characters wide so that I can have two columns of “standard sized” windows1. That set up makes it really easy to mess up your window configuration. For example, if you bring up a help screen, the focus remains in the original window as usual but now it’s hard to get rid of the *Help* window. If you type 【Ctrl+x 1】 you blow away all your other windows. You can switch into the *Help* window and type 【q】 but that’s a pain. With winner-mode you simply restore the previous window configuration and you’re back to where you were before invoking help.

If you aren’t currently using winner-mode, do yourself a favor and give it a spin. It’s built-in functionality so all you have to do to try it is type 【Meta+xwinner-mode and you’re all set. Now 【Ctrl+c 】 will restore the previous window configuration and 【Ctrl+c 】 will redo the configuration you just destroyed.

Try it like this for a bit and see if you aren’t addicted too. If you are, just add

(winner-mode 1)

to your .emacs or init.el file and it will always be their for you. If you don’t like it, just turn it off with 【Meta+-1 Meta+xwinner-mode. I had intended to try it for a week or so to see how I liked it but, as I say, I enabled it permanently almost immediately. Really, you should try it out.

Footnotes:

1 I know, I know but I’m an old-timey guy and can’t get over the notion that the proper size for a (source code) screen is 80 characters. It makes no sense, I admit, but there it is.

This entry was posted in General and tagged . Bookmark the permalink.