buffer-move

Homepage: https://github.com/lukhas/buffer-move

Author: Geyslan G. Bem, Lucas Bonnet, Mathis Hofer

Updated:

Summary

Easily swap buffers

Commentary

This file is for lazy people wanting to swap buffers without
typing C-x b on each window. This is useful when you have :

+--------------+-------------+
|              |             |
|    #emacs    |    #gnus    |
|              |             |
+--------------+-------------+
|                            |
|           .emacs           |
|                            |
+----------------------------+

and you want to have :

+--------------+-------------+
|              |             |
|    #gnus     |   .emacs    |
|              |             |
+--------------+-------------+
|                            |
|           #emacs           |
|                            |
+----------------------------+

With buffer-move, just go in #gnus, do buf-move-left, go to #emacs
(which now should be on top right) and do buf-move-down.

To use it, simply put a (require 'buffer-move) in your ~/.emacs and
define some keybindings. For example, i use :

(global-set-key (kbd "")     'buf-move-up)
(global-set-key (kbd "")   'buf-move-down)
(global-set-key (kbd "")   'buf-move-left)
(global-set-key (kbd "")  'buf-move-right)

Alternatively, you may let the current window switch back to the previous
buffer, instead of swapping the buffers of both windows. Set the
following customization variable to 'move to activate this behavior:

(setq buffer-move-behavior 'move)

Dependencies