From e074e76f09601938caa0ce74ab1c8ebb29fa0b6c Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 2 Oct 2023 22:26:59 -0700 Subject: [PATCH] Add some more ace-link keybindings --- oni-core.el | 8 +++++++- oni-org/oni-org.el | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/oni-core.el b/oni-core.el index bf4ce23..d57fac6 100644 --- a/oni-core.el +++ b/oni-core.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2023.0911.211246 +;; Version: 2023.1002.222641 ;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview mixed-pitch ace-window vertico marginalia orderless consult embark docstr mini-frame) ;; This program is free software; you can redistribute it and/or modify @@ -195,6 +195,12 @@ _s_: String list" (add-hook 'electric-indent-local-mode-hook #'oni-core--switch-newline-keys) (add-hook 'prog-mode-hook 'goto-address-prog-mode) +(defun oni-core-set-ace-link-goto-addr-binding () + "Set a key locally to open links using ‘ace-link’." + (local-set-key (kbd "C-c C-o") 'ace-link-addr)) + +(add-hook 'goto-address-prog-mode-hook #'oni-core-set-ace-link-goto-addr-binding) + (global-set-key (kbd "C-M-SPC") 'er/expand-region) (global-set-key (kbd "C-S-b") 'windmove-left) (global-set-key (kbd "C-S-f") 'windmove-right) diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index ba2b05c..8890904 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2023.0918.233520 +;; Version: 2023.1002.222539 ;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-bullets org-edna diminish all-the-icons olivetti form-feed org-pretty-table ob-async) ;; This program is free software; you can redistribute it and/or modify @@ -774,6 +774,9 @@ After running it once remove it from `org-capture-after-finalize-hook'." (define-key org-mode-map (kbd "C-c C-S-w") #'oni-org-refile-to-top) +(with-eval-after-load 'ace-link + (define-key org-mode-map (kbd "C-c C-o") 'ace-link-org)) + ;;; Export (require 'ox-html) (require 'nxml-mode)