From e2e6cfc798ad5a85af3820ba22d02db5fc21a8b0 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Mon, 12 Aug 2019 11:24:17 -0400 Subject: [PATCH] Move Magit higher up in the load order; load with-editor globally --- emacs/init.org | 75 ++++++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 33 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index 8702939..1f270b5 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -131,6 +131,48 @@ Make undo not undo paragraphs at a time: (setq evil-want-fine-undo t) #+END_SRC +* Magit +Magit is objectively the best Git interface. +#+BEGIN_SRC emacs-lisp + (use-package magit + :commands magit-status + :config + (add-to-list 'evil-emacs-state-modes 'magit-mode) + (add-to-list 'evil-emacs-state-modes 'magit-status-mode) + :general + (magit-mode-map "SPC" leader-map)) +#+END_SRC + +#+BEGIN_SRC emacs-lisp + (jdormit/define-prefix "g" "git") + (leader-def-key "gs" #'magit-status) + (leader-def-key "gb" #'magit-blame) + (leader-def-key "gf" #'magit-find-file) +#+END_SRC + +Use ido-mode for completion within Magit: +#+BEGIN_SRC emacs-lisp + (setq magit-completing-read-function 'magit-ido-completing-read) +#+END_SRC + +** Forge +[[https://github.com/magit/forge][Forge]] is an extension for Magit that lets it interact with code forges (e.g. GitHub). +#+BEGIN_SRC emacs-lisp + (use-package forge :quelpa + :config + (add-to-list 'forge-alist '("git.jeremydormitzer.com" "git.jeremydormitzer.com/api/v1" + "git.jeremydormitzer.com" forge-gitea-repository))) +#+END_SRC + +* with-editor +A utility from the author of Magit to run shell commands using the current Emacs instance as $EDITOR. + +#+BEGIN_SRC emacs-lisp + (shell-command-with-editor-mode) + (add-hook 'shell-mode-hook #'with-editor-export-editor) + (add-hook 'term-exec-hook #'with-editor-export-editor) + (add-hook 'eshell-mode-hook #'with-editor-export-editor) +#+END_SRC * Password Store Interfacing with Pass, the "standard Unix password manager". This should also be loaded before `exec-path-from-shell`. #+BEGIN_SRC emacs-lisp @@ -1380,39 +1422,6 @@ Enable lexical scoping in IELM: (setq lexical-binding t))) #+END_SRC -* Magit -Magit is objectively the best Git interface. -#+BEGIN_SRC emacs-lisp - (use-package magit - :commands magit-status - :config - (add-to-list 'evil-emacs-state-modes 'magit-mode) - (add-to-list 'evil-emacs-state-modes 'magit-status-mode) - :general - (magit-mode-map "SPC" leader-map)) -#+END_SRC - -#+BEGIN_SRC emacs-lisp - (jdormit/define-prefix "g" "git") - (leader-def-key "gs" #'magit-status) - (leader-def-key "gb" #'magit-blame) - (leader-def-key "gf" #'magit-find-file) -#+END_SRC - -Use ido-mode for completion within Magit: -#+BEGIN_SRC emacs-lisp - (setq magit-completing-read-function 'magit-ido-completing-read) -#+END_SRC - -** Forge -[[https://github.com/magit/forge][Forge]] is an extension for Magit that lets it interact with code forges (e.g. GitHub). -#+BEGIN_SRC emacs-lisp - (use-package forge :quelpa - :config - (add-to-list 'forge-alist '("git.jeremydormitzer.com" "git.jeremydormitzer.com/api/v1" - "git.jeremydormitzer.com" forge-gitea-repository))) -#+END_SRC - * Ledger Mode This mode requires that [[https://github.com/ledger/ledger][ledger]] be installed on the system. #+BEGIN_SRC emacs-lisp