diff options
author | Case Duckworth | 2021-09-29 17:22:32 -0500 |
---|---|---|
committer | Case Duckworth | 2021-09-29 17:22:32 -0500 |
commit | 13e1698e9b0ac53f1b1940e84c60d61fe4270ca3 (patch) | |
tree | 2dac77eccea234627ef906e0f07a4be17783ab8f | |
parent | Fix bindings (diff) | |
download | emacs-13e1698e9b0ac53f1b1940e84c60d61fe4270ca3.tar.gz emacs-13e1698e9b0ac53f1b1940e84c60d61fe4270ca3.zip |
Change avy and link-hint binds to use j
C-j link-hint-open-link M-j avy-goto-char-timer
-rw-r--r-- | init.el | 26 |
1 files changed, 10 insertions, 16 deletions
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 | |||
1632 | (link-hint--multiple (if prefix :open-secondary :open)))) | 1632 | (link-hint--multiple (if prefix :open-secondary :open)))) |
1633 | 1633 | ||
1634 | (:option link-hint-avy-style 'post) | 1634 | (:option link-hint-avy-style 'post) |
1635 | (:global "C-;" | 1635 | (:global "C-j" |
1636 | (defun acdw/link-hint-open-link (arg) | 1636 | (defun acdw/link-hint-open-link (arg) |
1637 | "Open a link using `link-hint-open-link', prefix-aware. | 1637 | "Open a link using `link-hint-open-link', prefix-aware. |
1638 | That is, a prefix argument (\\[universal-argument]) will open the | 1638 | That is, a prefix argument (\\[universal-argument]) will open the |
1639 | browser defined in `browse-url-secondary-browser-function'." | 1639 | browser defined in `browse-url-secondary-browser-function'." |
1640 | (interactive "P") | 1640 | (interactive "P") |
1641 | (avy-with link-hint-open-link | 1641 | (avy-with link-hint-open-link |
1642 | (link-hint--one (if arg :open-secondary :open))))) | 1642 | (link-hint--one (if arg :open-secondary :open)))))) |
1643 | |||
1644 | ;; Setup for different modes. | ||
1645 | ;; There has /got/ to be an easier way here! | ||
1646 | (dolist (key '(";" "o")) | ||
1647 | (:with-mode special-mode (:bind key #'link-hint-open-link)) | ||
1648 | (:with-mode help-mode (:bind key #'link-hint-open-link)) | ||
1649 | (:with-feature helpful (:bind key #'link-hint-open-link)) | ||
1650 | (:with-mode Info-mode (:bind key #'link-hint-open-link)) | ||
1651 | (:with-feature reading (:bind key #'link-hint-open-link)))) | ||
1652 | 1643 | ||
1653 | (setup (:straight lua-mode) | 1644 | (setup (:straight lua-mode) |
1654 | (:file-match (rx ".lua" eos))) | 1645 | (:file-match (rx ".lua" eos))) |
@@ -1856,7 +1847,8 @@ browser defined in `browse-url-secondary-browser-function'." | |||
1856 | "C-c C-p" #'acdw/org-previous-heading-widen | 1847 | "C-c C-p" #'acdw/org-previous-heading-widen |
1857 | "C-x n t" #'org-narrow-to-task) | 1848 | "C-x n t" #'org-narrow-to-task) |
1858 | 1849 | ||
1859 | (:unbind "C-'") | 1850 | (:unbind "C-j" ; org-return-and-maybe-indent |
1851 | "M-j") | ||
1860 | 1852 | ||
1861 | (with-eval-after-load 'org-export | 1853 | (with-eval-after-load 'org-export |
1862 | (:option (append org-export-filter-final-output-functions) | 1854 | (:option (append org-export-filter-final-output-functions) |
@@ -1980,13 +1972,15 @@ the default is \"/\"." | |||
1980 | (global-page-break-lines-mode +1)) | 1972 | (global-page-break-lines-mode +1)) |
1981 | 1973 | ||
1982 | (setup (:straight paredit) | 1974 | (setup (:straight paredit) |
1983 | ;; I don't use paredit-splice-sexp much, and it stomps on isearch. | ||
1984 | (:unbind "M-s") | ||
1985 | |||
1986 | (:bind "DEL" #'paredit-backward-delete | 1975 | (:bind "DEL" #'paredit-backward-delete |
1987 | "C-M-;" #'comment-or-uncomment-sexp | 1976 | "C-M-;" #'comment-or-uncomment-sexp |
1988 | "C-<backspace>" #'paredit-backward-kill-word | 1977 | "C-<backspace>" #'paredit-backward-kill-word |
1989 | "M-w" #'paredit-copy-as-kill) | 1978 | "M-w" #'paredit-copy-as-kill |
1979 | "RET" #'paredit-newline) | ||
1980 | |||
1981 | (:unbind "M-s" ; paredit-splice-sexp | ||
1982 | "C-j" ; paredit-newline (rebound to RET) | ||
1983 | ) | ||
1990 | 1984 | ||
1991 | (:hook-into emacs-lisp-mode | 1985 | (:hook-into emacs-lisp-mode |
1992 | ielm-mode sly-repl-mode | 1986 | ielm-mode sly-repl-mode |