I am using emacs I find that sometimes I have 2 files separated into 2 windows.
For example: I open 1 file using C-x C-f file1.c RET
and I split t
The transpose-frame library provides a pretty comprehensive set of functions for flipping or rotating the window arrangements in frames.
M-x flop-frame
RET does what this particular question needs.
The following diagrams are from the commentary in the library (and its EmacsWiki page):
‘transpose-frame’ … Swap x-direction and y-direction
+------------+------------+ +----------------+--------+
| | B | | A | |
| A +------------+ | | |
| | C | => +--------+-------+ D |
+------------+------------+ | B | C | |
| D | | | | |
+-------------------------+ +--------+-------+--------+
‘flip-frame’ … Flip vertically
+------------+------------+ +------------+------------+
| | B | | D |
| A +------------+ +------------+------------+
| | C | => | | C |
+------------+------------+ | A +------------+
| D | | | B |
+-------------------------+ +------------+------------+
‘flop-frame’ … Flop horizontally
+------------+------------+ +------------+------------+
| | B | | B | |
| A +------------+ +------------+ A |
| | C | => | C | |
+------------+------------+ +------------+------------+
| D | | D |
+-------------------------+ +-------------------------+
‘rotate-frame’ … Rotate 180 degrees
+------------+------------+ +-------------------------+
| | B | | D |
| A +------------+ +------------+------------+
| | C | => | C | |
+------------+------------+ +------------+ A |
| D | | B | |
+-------------------------+ +------------+------------+
‘rotate-frame-clockwise’ … Rotate 90 degrees clockwise
+------------+------------+ +-------+-----------------+
| | B | | | A |
| A +------------+ | | |
| | C | => | D +--------+--------+
+------------+------------+ | | B | C |
| D | | | | |
+-------------------------+ +-------+--------+--------+
‘rotate-frame-anti-clockwise’ … Rotate 90 degrees anti-clockwise
+------------+------------+ +--------+--------+-------+
| | B | | B | C | |
| A +------------+ | | | |
| | C | => +--------+--------+ D |
+------------+------------+ | A | |
| D | | | |
+-------------------------+ +-----------------+-------+