aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r--emacs/.emacs.d/lisp/my/my-dired.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-dired.el b/emacs/.emacs.d/lisp/my/my-dired.el
index d80c1c8..c64d9d2 100644
--- a/emacs/.emacs.d/lisp/my/my-dired.el
+++ b/emacs/.emacs.d/lisp/my/my-dired.el
@@ -139,5 +139,17 @@ With a prefix-arg, call it without using `vc-rename-file'."
(funcall rename-fun))
(funcall rename-fun)))
+(defun my-dired-display-file (_)
+ (dired-display-file))
+
+(define-minor-mode my-dired-follow-mode
+ "Diplay file at point in dired after a move."
+ :lighter " dired-f"
+ :global t
+ :group 'dired
+ (if my-dired-follow-mode
+ (advice-add 'dired-next-line :after #'my-dired-display-file)
+ (advice-remove 'dired-next-line #'my-dired-display-file)))
+
(provide 'my-dired)
;;; my-dired.el ends here