diff --git a/emacs/.emacs.d/config/init-git.el b/emacs/.emacs.d/config/init-git.el index 9b63ee5..5e425b9 100644 --- a/emacs/.emacs.d/config/init-git.el +++ b/emacs/.emacs.d/config/init-git.el @@ -16,6 +16,15 @@ "gg" #'magit-file-dispatch "gd" #'magit-dispatch)) +;; Not strictly git-related, but with-editor is the part of Magit that +;; lets Emacs be the $EDITOR for shell commands +(use-package with-editor + :hook ((eshell-mode . with-editor-export-editor) + (shell-mode . with-editor-export-editor) + (vterm-mode . with-editor-export-editor)) + :commands (with-editor-async-shell-command + with-editor-shell-command)) + ;; git-link makes it easy to copy the GitHub URL of the current file/line (use-package git-link :commands (git-link git-link-commit)