From c0368d8e65fd15a1f48de6a01adcb8ec786a72a0 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 29 Jun 2018 14:49:44 -0700 Subject: [emacs] Massive rewrite --- emacs.d/config/fcuny-magit.el | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 emacs.d/config/fcuny-magit.el (limited to 'emacs.d/config/fcuny-magit.el') diff --git a/emacs.d/config/fcuny-magit.el b/emacs.d/config/fcuny-magit.el new file mode 100644 index 0000000..b78398c --- /dev/null +++ b/emacs.d/config/fcuny-magit.el @@ -0,0 +1,29 @@ +(eval-when-compile + (require 'use-package)) + +(use-package magit + :mode (("differential-update-comments" . git-commit-mode) + ("new-commit" . git-commit-mode)) + :bind (("C-x g s" . magit-status) + ("C-x g b" . magit-checkout)) + :init + (progn + (setq magit-completing-read-function 'ivy-completing-read)) + + :config + (progn + (global-git-commit-mode) + + ;; I don't care about other VC backend for work + (if (fc/check-work-machine-p) + (setf vc-handled-backends nil + vc-follow-symlinks t)) + + (use-package git-commit :ensure t) + + (add-hook 'magit-log-edit-mode-hook + #'(lambda () + (set-fill-column 72) + (flyspell-mode))))) + +(provide 'fcuny-magit) -- cgit 1.4.1