0

Say I have I split-window with C-x 2 or C-x 3 and then I want to widen the active panel with C-x }. I either have to type this command many times over, or I need to know the exact number of columns I want to widen this panel by and do M-<N> C-x }.

But instead what I want is to keep a key pressed down and have the panel expand until I let go. Is this possible?

pseudosudo
  • 6,270
  • 9
  • 40
  • 53
  • 1
    possible duplicate of [How to Change size of split screen emacs windows?](http://stackoverflow.com/questions/4987760/how-to-change-size-of-split-screen-emacs-windows) – phils Mar 20 '12 at 03:32

3 Answers3

1

C-x z works to repeat or you can directly make C-x } repeatable with repeat-macro-def.el.

(require 'repeat-macro-def)
(defun-repeatable enlarge-window)
(defun-repeatable enlarge-window-horizontally)
(global-set-key [remap enlarge-window] 'enlarge-window-repeatable)
(global-set-key [remap enlarge-window-horizontally] 'enlarge-window-horizontally-repeatable)
event_jr
  • 17,467
  • 4
  • 47
  • 62
0

You can pass the numer of columns to move as an argument to C-x to move as many spaces as you would like. Just hit:

M-20 C-x{

thats while holding alt, enter the number of spaces, then release it. then hit control x followed by the direction key ( ^, {, }, etc)

Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284
0

What I was looking for was answered in How to change size of split screen emacs windows? (thanks @phils):

Use either C-x } or C-x { to shrink or widen the panel, then follow it with the repeat command (C-x z to initiate, and keep z pressed for continued repetition).

Community
  • 1
  • 1
pseudosudo
  • 6,270
  • 9
  • 40
  • 53