Emacs broken into 3 windows

Quick question: how to specify the number of characters in a split window? Cx-3 Evenly splits my window into two windows, but a subsequent split splits one of the windows in half. I would like 3 windows with equal size. The documentation says that I have to specify the number of characters for the left buffer as a parameter, but I cannot get this to work. Any ideas for the syntax?

Thank.

+76
emacs
Apr 05 2018-10-10T00:
source share
6 answers

To specify the number of characters in the split window, do:

Cu number of characters Cx 3

+24
Apr 05 '10 at 7:50
source share

Cx 3 followed by Cx + so that all windows are equally sized.

+250
Apr 05 '10 at 9:11
source share

I have the following in .emacs :

 (defadvice split-window-horizontally (after rebalance-windows activate) (balance-windows)) (ad-activate 'split-window-horizontally) 

this makes a call to emacs rebalance-windows (with which Cx + bound by default) after each resize. This is not what I want all the time, but I want it much more often than the default behavior.

+15
Apr 05 '10 at
source share

add .emacs . I am mapped to Cx 4, but who has an idea?

 (defun split-3-windows-horizontally-evenly () (interactive) (command-execute 'split-window-horizontally) (command-execute 'split-window-horizontally) (command-execute 'balance-windows) ) (global-set-key (kbd "Cx 4") 'split-3-windows-horizontally-evenly) 
+11
Dec 13 '11 at 9:35 a.m.
source share
 (defun wenshan-split-window-vertical (&optional wenshan-number) "Split the current window into `wenshan-number' windows" (interactive "P") (setq wenshan-number (if wenshan-number (prefix-numeric-value wenshan-number) 2)) (while (> wenshan-number 1) (split-window-right) (setq wenshan-number (- wenshan-number 1))) (balance-windows)) 

This function can be used to split the current window into N windows, you can enter "Cu 3 Mx wenshan-split-window-vertical" to achieve what you want.

+4
Apr 16 '13 at 12:14
source share

If you use evil, Cx 3 , and then Cw =

+2
Feb 17 '16 at 16:02
source share



All Articles