diff options
author | Yuchen Pei <id@ypei.org> | 2023-06-27 09:34:11 +1000 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2023-06-27 09:34:11 +1000 |
commit | 4edc5f34347efbc4422947bde97f95918d29229e (patch) | |
tree | 3f7d4607598752770657e36b9b225c62f0002b77 /emacs/.emacs.d/lisp/my | |
parent | 8c515e3b6efdcfecc213b56c860fccac2d9138cf (diff) |
dired and vc
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-dired.el | 12 |
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 |