4 ms·
Nice article. Good explanation and good guidelines. Sometimes the evenly split windows don't cut it. I put the following function in the init.el file and bin
by ww520 2y ago
Nice article. Good explanation and good guidelines.
Sometimes the evenly split windows don't cut it. I put the following function in the init.el file and bind "C-x 7" to it to adjust the current window and its peer to 70% and 30% sizes vertically. Same for horizontally with a "C-x 8" key binding.
(defun partial-size-window ()
"Set the two split windows to 70% and 30% vertically."
(interactive)
(let ((size (- (truncate (* .70 (frame-height))) (window-height))))
(if (> size 0)
(enlarge-window size))))
(defun partial-size-window-h ()
"Set the two split windows to 70% and 30% horizontally."
(interactive)
(let ((size (- (truncate (* .70 (frame-width))) (window-width))))
(if (> size 0)
(enlarge-window-horizontally size))))
- jackcviers3 2y agogolden-ratio works for this as well.
- medstrom 2y agoyup, unlike the name implies, it does not only do the golden ratio (1.618:1) Though now I also found https://git.sr.ht/~wklew/golden https://git.sr.ht/~wklew/golden
- emporas 2y agogolden-ratio is very convenient. I also split the frame to two windows at most, and most of the times i focus on one window, and the other window takes just 25% of the screen space. What i have not found a solution yet, is when one window is expanded to 75% of space, then it collapses to 25%, the notes i wanted to focus on get moved up or down. After some trial and error i put my cursor somewhere downward not far from the text i want to be displayed, and most of the time it gets displayed after collapsing the space. I have yet to figure out how to select a region, and golden ratio keep that in display after rebalancing.
- BaculumMeumEst 2y agoI think zoom-mode is the more recommended package for this functionality nowadays, but I will defer to someone who knows more. I just know golden-ratio was a little jank when I tried it recently, but zoom works well.