Skip to content

Commit

Permalink
tweak(defaults): add pulse line
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Oct 7, 2023
1 parent a264cde commit 7d54316
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/me-defaults.el
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,15 @@
;; Small tab is enough!
tab-width 2)

;; Add visual pulse when changing focus, like beacon but built-in
;; From https://karthinks.com/software/batteries-included-with-emacs/
(defun +pulse-line (&rest _)
"Pulse the current line."
(pulse-momentary-highlight-one-line (point)))

(dolist (command '(scroll-up-command scroll-down-command recenter-top-bottom other-window))
(advice-add command :after #'+pulse-line))

;; ====== Misc hooks and advices ======
;; Kill the minibuffer when switching by mouse to another window.
;; Adapted from: trey-jackson.blogspot.com/2010/04/emacs-tip-36-abort-minibuffer-when.html
Expand Down

0 comments on commit 7d54316

Please sign in to comment.