From 261d41f180a89c1962a671bbfaa7484ebd17a5bc Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 1 Nov 2013 12:58:01 -0400 Subject: Add separate magit init file --- init/km-magit.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 init/km-magit.el (limited to 'init/km-magit.el') diff --git a/init/km-magit.el b/init/km-magit.el new file mode 100644 index 0000000..5b77aea --- /dev/null +++ b/init/km-magit.el @@ -0,0 +1,18 @@ +(require 'magit) + +(defun km/magit-auto-commit () + (interactive) + (save-window-excursion + (magit-with-refresh + (shell-command "git --no-pager commit --all --message=auto")))) + +(define-key magit-status-mode-map (kbd "C-c C-u") 'km/magit-auto-commit) + +;; http://whattheemacsd.com/setup-magit.el-05.html +(defun km/magit-just-amend () + (interactive) + (save-window-excursion + (magit-with-refresh + (shell-command "git --no-pager commit --amend --reuse-message=HEAD")))) + +(define-key magit-status-mode-map (kbd "C-c C-a") 'km/magit-just-amend) -- cgit v1.2.3