2

I have 3 windows opened and I want to change which buffers they display.

For example: when programming in C, I want to have the C code on the left, and the right side split into two windows showing gdb and the locals variables. If I open them in order, Emacs puts the buffers in a layout I'm not comfortable with.

How can I arrange which buffers are in which windows? Can I do it without using non-built-in packages?

Dan
  • 32,584
  • 6
  • 98
  • 168
carl.if
  • 21
  • 1
  • I think you do need a plugin. there's buffer-move.el, about 50 lines of code. Else, i think you'd have to write that yourself. – Xah Lee Jul 09 '16 at 19:18
  • I can't understand how Tyler's answer fits the question. I understand the question to be similar to [gud - Customizing the layout of gdb-many-windows - Emacs Stack Exchange](http://emacs.stackexchange.com/questions/1069/customizing-the-layout-of-gdb-many-windows) and so the answer(s) there might suit you. – Stéphane Gourichon Mar 10 '17 at 10:26
  • buffer-move.el - not work - https://emacs.stackexchange.com/questions/44187/not-work-package-buffer-move-symbols-value-as-variable-is-void-closed – a_subscriber Aug 18 '18 at 12:56

1 Answers1

1

The ace-window package provides a function ace-swap-window that provides a nice interface for this. When you call the command each window gets a letter label. Type that letter and it will swap the buffers in the current window and the selected window. Variations allow you to select or delete different windows as well.

Tyler
  • 21,719
  • 1
  • 52
  • 92