diff options
author | David Morgan <djm_uk@protonmail.com> | 2022-10-17 16:38:36 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2022-10-17 20:50:00 +0100 |
commit | e1f7d9ddcd335b99f4a672579189ba8c1f43c915 (patch) | |
tree | ba3e6fb11cc1d5fa7193878bba59d746750489d9 | |
parent | 3ed968667143520e64ab52604955ee5e49fd1455 (diff) | |
download | dotfiles-e1f7d9ddcd335b99f4a672579189ba8c1f43c915.tar.gz |
Add symbol-overlay-put-or-clear
-rw-r--r-- | .emacs.d/lisp/init-navigation.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/.emacs.d/lisp/init-navigation.el b/.emacs.d/lisp/init-navigation.el index 714a95e..5a8ec98 100644 --- a/.emacs.d/lisp/init-navigation.el +++ b/.emacs.d/lisp/init-navigation.el @@ -41,11 +41,18 @@ ("C-M-'" . smartscan-symbol-replace))) (use-package symbol-overlay + :config + (defun symbol-overlay-put-or-clear (arg) + "Toggle all overlays of symbol at point. +Or remove all highlighted symbols in the current buffer (with`ARG')." + (interactive "P") + (if arg + (symbol-overlay-remove-all) + (symbol-overlay-put))) :bind - ("C-c o" . symbol-overlay-put) + ("C-c o" . symbol-overlay-put-or-clear) ("M-N" . symbol-overlay-switch-forward) - ("M-P" . symbol-overlay-switch-backward) - ("<f8>" . symbol-overlay-remove-all)) + ("M-P" . symbol-overlay-switch-backward)) (use-package gumshoe :defer 5 |