Is there a way to configure Emacs to start with two windows automatically, vertically split, and with the right side taking up ~60% of the total screen real estate?
2 Answers
If there is a way I bet you can find it on this page: Emacs Session Management
-
Great! It looks like this will do: emacswiki.org/emacs/WorkgroupsForWindows– JoshJan 11, 2011 at 17:36
-
-
I agree with David., Its better to write answer here on this page instead of linking to some where else. Dec 19, 2011 at 0:11
Assuming that you start with a window that is 80 columns by 50 columns, add this to your .emacs (from gnu.org):
To start with Horizontal split:
(setq w (selected-window)) (window-edges) (setq w2 (split-window w 15)) (window-edges w2) (window-edges w)
To start with Vertical split (to get 60% on the right side, the width is set to
40 * (1 - 0.6) = 32
(setq w (selected-window)) (window-edges) (setq w2 (split-window w 32 t)) (window-edges w2) (window-edges w)
-
this really answer the question. even though I would rather put all in a
lambda
and add it toinit-hook
Dec 19, 2011 at 0:13 -
@kindahero it does answer the original question, but only by copy and paste with minor modification. A better answer would explain what you mean by lambda and init-hook as well as what the code means and how it could be adapted (e.g. to open four windows instead of two). Dec 19, 2011 at 1:36