diff options
author | Kyle Meyer <kyle@kyleam.com> | 2013-11-01 12:58:01 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2013-11-01 13:33:59 -0400 |
commit | 261d41f180a89c1962a671bbfaa7484ebd17a5bc (patch) | |
tree | 8e8dc00b52519bb0ea4af2926dbb53ec7c8cd641 | |
parent | 77e1a33070f0aa1c7358699d0e72b84d17c8e436 (diff) | |
download | emacs.d-261d41f180a89c1962a671bbfaa7484ebd17a5bc.tar.gz |
Add separate magit init file
-rw-r--r-- | init/km-func.el | 19 | ||||
-rw-r--r-- | init/km-magit.el | 18 |
2 files changed, 18 insertions, 19 deletions
diff --git a/init/km-func.el b/init/km-func.el index 4043cb9..bf98552 100644 --- a/init/km-func.el +++ b/init/km-func.el @@ -163,22 +163,3 @@ 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)) - -(defun km/magit-auto-commit () - (interactive) - (save-window-excursion - (magit-with-refresh - (shell-command "git --no-pager commit --all --message=auto")))) - -(eval-after-load "magit" - '(define-key magit-status-mode-map (kbd "C-c C-u") 'km/magit-auto-commit)) 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) |