diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-02-17 17:08:00 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-02-17 17:08:45 +0100 |
commit | cb68b60965b9267d3ed763a5a2979ad9a7646497 (patch) | |
tree | 02947a28b583f7f14cb5034163df323935f839e6 /keybindings.el | |
parent | 4c4c0d7e68a573d01f80f0a9a398b2691f8775c7 (diff) |
Add shortcut to git commit current file
Diffstat (limited to 'keybindings.el')
-rw-r--r-- | keybindings.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/keybindings.el b/keybindings.el index 3219129..a35ae7b 100644 --- a/keybindings.el +++ b/keybindings.el @@ -1,3 +1,9 @@ +(defun xcpu-commit-current-file () + (interactive) + (magit-stage-file (magit-file-relative-name)) + (magit-commit) + ) + (global-set-key (kbd "C-, c") 'comment-region) (global-set-key (kbd "C-, u") 'uncomment-region) (global-set-key (kbd "C-, w") 'delete-trailing-whitespace) @@ -6,3 +12,4 @@ (global-set-key (kbd "C-, e") 'eval-region) (global-set-key (kbd "C-, a") 'align-regexp) (global-set-key (kbd "C-, s") 'delete-trailing-whitespace) +(global-set-key (kbd "C-, c") 'xcpu-commit-current-file) |