aboutsummaryrefslogtreecommitdiffstats
path: root/oni-core.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2023-05-24 23:51:09 -0700
committerGravatar Tom Willemse2023-05-24 23:51:09 -0700
commit020f19fcbc9b197f2355de463f781868fa31ebde (patch)
tree74f6a9ab2ebe2f03e302ad7f961691bd554193bf /oni-core.el
parentb26c3c8899ae25cb696e90ffa570f8d5635a7a89 (diff)
downloademacs-config-020f19fcbc9b197f2355de463f781868fa31ebde.tar.gz
emacs-config-020f19fcbc9b197f2355de463f781868fa31ebde.zip
[oni-core] Add keybinding to select which window to use as “other”
Diffstat (limited to 'oni-core.el')
-rw-r--r--oni-core.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/oni-core.el b/oni-core.el
index b18560b..cdc1a61 100644
--- a/oni-core.el
+++ b/oni-core.el
@@ -358,6 +358,11 @@ _s_: String list"
(backward-char)
(looking-back (rx word) (1- (point)))))
+(defun oni-core-ace-window-select-other-window ()
+ "Use ‘ace-window’ to select which window is considered “other”."
+ (interactive)
+ (setq other-window-scroll-buffer (ace-select-window)))
+
(with-eval-after-load 'electric
(add-hook 'electric-quote-inhibit-functions #'oni-core-in-word-p))
@@ -399,6 +404,7 @@ _s_: String list"
(global-set-key (kbd "C-c w d") '("Delete a window" . ace-delete-window))
(global-set-key (kbd "C-c w k") '("Keep a single window" . ace-delete-other-windows))
+(global-set-key (kbd "C-c w o") '("Select other window" . oni-core-ace-window-select-other-window))
(global-set-key (kbd "M-g M") '("Jump to a mark anywhere" . consult-global-mark))
(global-set-key (kbd "M-g m") '("Jump to a mark" . consult-mark))
(global-set-key [remap bookmark-jump] 'consult-bookmark)