I want to change the screen vertically divided by emacs from side to side.

Asked 2 months ago, Updated 2 months ago, 2 views

How do I replace the left and right windows after C-x3 and dividing the screen into two parts?


2022-09-30 11:48

1 Answers

This is a function that replaces screens when they are divided into two parts.

; from http://www.emacswiki.org/emacs/TransposeWindows
(defun swap-window-positions(); Stephen Gildea
  "*Swap the positions of this window and the next one."
    (let((other-window-buffer(window-buffer other-window))
          (other-window-hscroll (window-hscroll other-window))
          (other-window-point (window-point other-window))
          (other-window-start (window-start other-window))
      (set-window-buffer other-window (current-buffer))
      (set-window-hscroll other-window (window-hscroll(selected-window)))
      (set-window-point other-window(point))
      (set-window-start other-window (window-start(selected-window)))
      (set-window-buffer (selected-window) other-window-buffer)
      (set-window-hscroll (selected-window) other-window-hscroll)
      (set-window-point (selected-window) other-window-point)
      (set-window-start (selected-window) other-window-start))
    (select-window other-window))

2022-09-30 11:48

If you have any answers or tips

© 2022 OneMinuteCode. All rights reserved.