From 020f19fcbc9b197f2355de463f781868fa31ebde Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 24 May 2023 23:51:09 -0700 Subject: [oni-core] Add keybinding to select which window to use as “other” --- oni-core.el | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- cgit v1.2.3-54-g00ecf