Reopen buffer in split view
Asked Answered
P

3

5

Is there an built-in option in emacs to toggle between full window and a split window, so that both files remain the same? As if minimizing one buffer for a while. Currently, when I do C-x 3 to split vertically it will open the same buffer, I then open a file in the other window. But at some point I want to concentrate fully on one part again and "minimize" the other half of the window. And later I want to unminimize and have both files shown again. Is this toggling of emacs windows possible?

NB: I use term "window" in emacsian.

Paugh answered 2/9, 2013 at 17:57 Comment(0)
H
4

I'm using `winner-mode' for this purpose:

(winner-mode)
(global-set-key [f9] 'delete-other-windows)
(global-set-key [C-f9] 'delete-window)
(global-set-key (kbd "<f7>") 'winner-undo)
(global-set-key (kbd "C-<f7>") 'winner-redo)

This way

  • f9 "maximizes" the current window,
  • f7 restores the previous configuration.
  • C-f9 "minimizes" the current window.

I rarely use C-f7, just included it for completeness.

Hutchens answered 2/9, 2013 at 18:19 Comment(0)
S
3

You can use window configuration registers for this.

Servility answered 2/9, 2013 at 18:10 Comment(0)
T
2

@Seanmcl's answer is a good one, as is @abo-abo's.

Depending on how you work or just what you want to do, you can also use C-x 5 2 to open the current buffer in a new frame. And then use C-x 5 0 there to delete that frame when done focusing on that buffer.

Transmontane answered 2/9, 2013 at 18:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.