summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keybindings.el7
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)