summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2013-10-29 19:25:57 -0400
committerKyle Meyer <kyle@kyleam.com>2013-10-29 19:35:49 -0400
commit045906bffbdaf2fa337b6a8e67a4f944f22e8edc (patch)
tree8dbfd42f239a97fc1bfe3a93b3d243138cc7677e /init
parent0d35b5a4ad23f8060da9fab46015a653fef2c92b (diff)
downloademacs.d-045906bffbdaf2fa337b6a8e67a4f944f22e8edc.tar.gz
Function for quick amend with magit
Diffstat (limited to 'init')
-rw-r--r--init/km-func.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/init/km-func.el b/init/km-func.el
index bf98552..700bb42 100644
--- a/init/km-func.el
+++ b/init/km-func.el
@@ -163,3 +163,13 @@ KILLARG."
(other-window 1))
(global-set-key (kbd "C-c s") 'km/swap-windows)
+
+;; 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"))))
+
+(eval-after-load "magit"
+ '(define-key magit-status-mode-map (kbd "C-c C-a") 'km/magit-just-amend))