Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7831051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:33:05+00:00 2026-06-02T11:33:05+00:00

I’m currently in mode: C-x 2 Normally, I don’t care much about vertical splitting.

  • 0

I’m currently in mode: C-x 2

Normally, I don’t care much about vertical splitting. However, I’m coding on a 13″ display, which makes vertical space rather precious.

I would like some setup where when I do C-x 2, my window is not split 50/50, but rather 70/30 [this way I can send the repl to the bottom portion of the screen, and stll see quite a bit of code.]

C-h a vertical split

brings up:

split-window-vertically, table-split-call-vertically

However, I suspect there is some parameter that changes / controls the split ratio.

What emacs option tells my computer to split 70/30 rather than 50/50?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T11:33:07+00:00Added an answer on June 2, 2026 at 11:33 am

    You can use a prefix argument to tell Emacs how many lines to give each of the two windows.

    See: C-hk C-x2
    or C-hf split-window-below RET

    If optional argument SIZE is omitted or nil, both windows get the
    same height, or close to it. If SIZE is positive, the upper
    (selected) window gets SIZE lines. If SIZE is negative, the
    lower (new) window gets -SIZE lines.

    So you could give the upper window 20 lines and the lower window the remainder with: C-u 20 C-x2
    (or M-2M-0C-x2, etc…)

    And you could give the lower window 10 lines and the upper window the remainder with: C-u -10 C-x2
    (or M--M-1M-0C-x2, etc…)

    See How to change size of split screen emacs windows? for lots of ways to modify the size of windows after splitting.

    Edit:

    You can use the following function to do what you want:

    (defun my-split-window-below (&optional arg)
      "Split the current window 70/30 rather than 50/50.
    A single-digit prefix argument gives the top window arg*10%."
      (interactive "P")
      (let ((proportion (* (or arg 7) 0.1)))
        (split-window-below (round (* proportion (window-height))))))
    
    (global-set-key (kbd "C-c x 2") 'my-split-window-below)
    

    The default ratio is 70/30, but you can supply a single-digit prefix argument to specify the size of the top window in 10% increments.

    If you bound this command to C-x2 then C-9C-x2 would give the top window 90% and the bottom 10%.


    Edit 2: I ended up using a variation of that as my own C-x2 binding. This version defaults to a normal 50/50 split, but provides the same prefix arg functionality of the other function in case I want something different.

    (defun my-split-window-below (&optional arg)
      "Split the current window 50/50 by default.
    A single-digit prefix argument gives the top window ARG * 10%
    of the available lines."
      (interactive "P")
      (let* ((proportion (and arg (* arg 0.1)))
             (size (and proportion (round (* proportion (window-height))))))
        (split-window-below size)))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported
I would like to run a str_replace or preg_replace which looks for certain words
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.