Reconfigure ace-window
* Make it possible to scroll (up/down) and bury window buffers * Map window selectors back to the defaults (numbers) * Make dispatcher run always, even for only two windows
This commit is contained in:
parent
822260dad0
commit
a80b9348cc
15
init.el
15
init.el
@ -371,9 +371,18 @@
|
||||
|
||||
(use-package ace-window
|
||||
:ensure t
|
||||
:init
|
||||
(setq aw-keys '(?a ?o ?e ?u ?i ?d ?h ?t ?n)
|
||||
aw-background nil)
|
||||
:config
|
||||
(setq aw-background nil
|
||||
aw-dispatch-always t)
|
||||
(add-to-list 'aw-dispatch-alist
|
||||
'(?s gpolonkai/scroll-window-up " Scroll window up")
|
||||
t)
|
||||
(add-to-list 'aw-dispatch-alist
|
||||
'(?S gpolonkai/scroll-window-down " Scroll window down")
|
||||
t)
|
||||
(add-to-list 'aw-dispatch-alist
|
||||
'(?q gpolonkai/bury-window " Bury (quit) window")
|
||||
t)
|
||||
:bind
|
||||
(:map ctl-x-map
|
||||
("o" . ace-window)))
|
||||
|
@ -35,3 +35,22 @@
|
||||
(select-window first-win)
|
||||
(if this-win-2nd (other-window 1))))
|
||||
(error "This works only for two windows!")))
|
||||
|
||||
(defun gpolonkai/scroll-window-up (window)
|
||||
"Scroll WINDOW up as `scroll-up-command' would."
|
||||
(interactive)
|
||||
(save-selected-window
|
||||
(select-window window)
|
||||
(scroll-up)))
|
||||
|
||||
(defun gpolonkai/scroll-window-down (window)
|
||||
"Scroll WINDOW down as `scroll-down-command' would."
|
||||
(interactive)
|
||||
(save-selected-window
|
||||
(select-window window)
|
||||
(scroll-down)))
|
||||
|
||||
(defun gpolonkai/bury-window (window)
|
||||
"Quit WINDOW without killing it."
|
||||
(interactive)
|
||||
(quit-window nil window))
|
||||
|
Loading…
x
Reference in New Issue
Block a user