ace-window
ace-window copied to clipboard
Add function to call ace-window with forced aw-dispatch
Hi, I apologize if this was already asked.
I use ace-window with aw-dispatch-always
set to nil, as I really like the use of M-o
as a switch windows when I have only 2 windows. However, I also find very comfortably having the dispatchable actions (like v
to split a window). Without changing the value of aw-dispatch-always
, I thought that something like this can be added:
(defun ace-window-manual-dispatch (arg)
"Calls `ace-window' with ARG asking for the dispatch, even if `aw-dispatch-always' is nil.
This could be useful to use the advanced commands"
(interactive "p")
(let ((aw-dispatch-always t))
(ace-window arg)
))
I use that in my init file and it works, and I bound that to C-M-o
, in order to have like a "super" ace-window
call.
If that is useful, I would be very happy to create a pull request for it.
Alternatively, maybe...doing three prefix args would force showing the dispatcher? That's starting to get a bit extreme, but using some kind of prefix arg for ace-window
to force showing the dispatcher seems more idiomatic.
(Personally, I'd get rid of the delete-window behavior with two prefix args, since I never use that. )