From 020f19fcbc9b197f2355de463f781868fa31ebde Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 24 May 2023 23:51:09 -0700 Subject: [PATCH] =?UTF-8?q?[oni-core]=20Add=20keybinding=20to=20select=20w?= =?UTF-8?q?hich=20window=20to=20use=20as=20=E2=80=9Cother=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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)