From 13e1698e9b0ac53f1b1940e84c60d61fe4270ca3 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 29 Sep 2021 17:22:32 -0500 Subject: Change avy and link-hint binds to use j C-j link-hint-open-link M-j avy-goto-char-timer --- init.el | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 8eda27c..fff1782 100644 --- a/init.el +++ b/init.el @@ -1632,23 +1632,14 @@ When PREFIX is non-nil, open links with (link-hint--multiple (if prefix :open-secondary :open)))) (:option link-hint-avy-style 'post) - (:global "C-;" + (:global "C-j" (defun acdw/link-hint-open-link (arg) "Open a link using `link-hint-open-link', prefix-aware. That is, a prefix argument (\\[universal-argument]) will open the browser defined in `browse-url-secondary-browser-function'." (interactive "P") (avy-with link-hint-open-link - (link-hint--one (if arg :open-secondary :open))))) - - ;; Setup for different modes. - ;; There has /got/ to be an easier way here! - (dolist (key '(";" "o")) - (:with-mode special-mode (:bind key #'link-hint-open-link)) - (:with-mode help-mode (:bind key #'link-hint-open-link)) - (:with-feature helpful (:bind key #'link-hint-open-link)) - (:with-mode Info-mode (:bind key #'link-hint-open-link)) - (:with-feature reading (:bind key #'link-hint-open-link)))) + (link-hint--one (if arg :open-secondary :open)))))) (setup (:straight lua-mode) (:file-match (rx ".lua" eos))) @@ -1856,7 +1847,8 @@ browser defined in `browse-url-secondary-browser-function'." "C-c C-p" #'acdw/org-previous-heading-widen "C-x n t" #'org-narrow-to-task) - (:unbind "C-'") + (:unbind "C-j" ; org-return-and-maybe-indent + "M-j") (with-eval-after-load 'org-export (:option (append org-export-filter-final-output-functions) @@ -1980,13 +1972,15 @@ the default is \"/\"." (global-page-break-lines-mode +1)) (setup (:straight paredit) - ;; I don't use paredit-splice-sexp much, and it stomps on isearch. - (:unbind "M-s") - (:bind "DEL" #'paredit-backward-delete "C-M-;" #'comment-or-uncomment-sexp "C-" #'paredit-backward-kill-word - "M-w" #'paredit-copy-as-kill) + "M-w" #'paredit-copy-as-kill + "RET" #'paredit-newline) + + (:unbind "M-s" ; paredit-splice-sexp + "C-j" ; paredit-newline (rebound to RET) + ) (:hook-into emacs-lisp-mode ielm-mode sly-repl-mode -- cgit 1.4.1-21-gabe81