abo-abo / ace-window

Quickly switch windows in Emacs
977 stars 87 forks source link

How fast swap between buffers? #139

Closed alexei-28 closed 6 years ago

alexei-28 commented 6 years ago

Windows 10, Emacs 25.1

I have 4 open buffers.

Here

step_0

To switch from buffer "file_1.txt" to buffer "file_2.txt" I use standard command windmove-right. It is bound to <M-right>.

step_1

To switch from buffer "file_2.txt" to buffer "file_3.txt" I use standard command windmove-down. It is bound to <M-down>.

And so on. It's very comfortable. Nice.

But what if I need to SWAP buffers "file_1.txt" and "file_2.txt"?

The result must be like this:

step_2

To do this I use package ace-window and command ace-swap-window.

Here steps.

  1. Start command ace-swap-window

step_3

Select number of windows I want to swap - "3" step_4

And as result the buffer "file_1.txt" and "file_2.txt" was swapped.

step_5

But I think it's very slow.

Is it possible when I stay on buffer "file_1.txt" and press, e.g. <M-S-right> to swap buffer "file_1.txt" and "file_2.txt".

Or when I stay on buffer "file_2.txt" and press, e.g. <M-S-down> to swap buffer "file_2.txt" and "file_4.txt".

I think it will be very fast and convenient.

abo-abo commented 6 years ago

I think it will be very fast and convenient.

Maybe so, but it's not the responsibility of ace-window. This looks like a feature request for windmove.

articuluxe commented 6 years ago

This is already available in repo github.com/emacsmirror/buffer-move.git

On Aug 20, 2018, at 3:53 AM, Oleh Krehel notifications@github.com wrote:

I think it will be very fast and convenient.

Maybe so, but it's not the responsibility of ace-window. This looks like a feature request for windmove.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

alexei-28 commented 6 years ago

Windows 10, Emacs 25.1

After install from Melpa and set in my init.el

(require 'buffer-move)

I restart Emacs and get error:

Symbol's value as variable is void: closed

When I evaluate

(require 'buffer-move)

I get error:

Debugger entered--Lisp error: (void-variable closed)
eval-buffer(#<buffer load> nil "mypath_to_emacs/emacs/.emacs.d/elpa/buffer-move-20160615.1103/buffer-move.el" nil t) ; Reading at buffer position 7
load-with-code-conversion("mypath_to_emacs/emacs/.emacs.d/elpa/buffer-move-20160615.1103/buffer-move.el" "mypath_to_emacs/emacs/.emacs.d/elpa/buffer-move-20160615.1103/buffer-move.el" nil t)
require(buffer-move)
eval((require (quote buffer-move)) nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)