From cb68b60965b9267d3ed763a5a2979ad9a7646497 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Wed, 17 Feb 2016 17:08:00 +0100 Subject: Add shortcut to git commit current file --- keybindings.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'keybindings.el') 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) -- cgit v1.2.3