From e352033483b6cba5f694ae0bfe75dff917aa7b87 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 29 Sep 2020 17:49:21 +0100 Subject: (Emacs)+auto insert for commit messages Just does a skeleton of what this commit is like: a module, a simple description then perhaps a description --- Emacs/.config/emacs/config.org | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Emacs/.config/emacs/config.org') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 1ebf0b6..6072e82 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1334,7 +1334,8 @@ Magit is *the* git porcelain for Emacs, which perfectly encapsulates the git cli. In this case, I just need to setup the bindings for it. As magit will definitely load after evil (as it must be run by a binding, and evil will load after init), I can use evil-collection -freely. +freely. Also, define an auto insert for commit messages so that I +don't need to write everything myself. #+begin_src emacs-lisp (use-package magit @@ -1342,7 +1343,12 @@ freely. (leader "g" #'magit-status) :init (setq magit-completing-read-function 'magit-ido-completing-read - vc-follow-symlinks t)) + vc-follow-symlinks t) + (with-eval-after-load "autoinsert" + (define-auto-insert '("COMMIT_EDITMSG" , "Commit") + '(nil + "(" (read-string "Enter feature/module: ") ")" (read-string "Enter simple description: ") "\n\n" + _)))) (use-package evil-magit :after magit -- cgit v1.2.3-13-gbd6f