Balancing Windows

Here’s a tiny tip from Zachary Kanfer. Like me, he prefers to keep his Emacs windows the same size. That’s pretty easy to do: when you split or delete a window resulting in an unbalanced layout, you can merely call balance-windows with Ctrl+x +.

I tend to stay with two windows so this doesn’t come up often for me but Kanfer has a richer window environment and one day he realized that he was doing too much manual work keeping his windows balanced. He noticed that they became unbalanced when he deleted or split windows so he wrote 4 lines of Elisp that arranged for those functions to call balance-windows after they ran. Now he longer has to think about balancing his widows; it just happens.

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