3

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 2

2

If there is a way I bet you can find it on this page: Emacs Session Management

3
  • Great! It looks like this will do: emacswiki.org/emacs/WorkgroupsForWindows
    – Josh
    Jan 11, 2011 at 17:36
  • (-1) that doesn't really answer the question Dec 17, 2011 at 20:34
  • I agree with David., Its better to write answer here on this page instead of linking to some where else.
    – kindahero
    Dec 19, 2011 at 0:11
3

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)
    
2
  • this really answer the question. even though I would rather put all in a lambda and add it to init-hook
    – kindahero
    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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .