From: James Bunton Date: Sat, 30 Jul 2016 10:59:02 +0000 (+1000) Subject: magit key binding improvements X-Git-Url: https://code.delx.au/dotemacs/commitdiff_plain/ad6987d405f6c9aff86cde0da3a39b4937475a2f magit key binding improvements --- diff --git a/README.md b/README.md index d4a32ce..65a92e3 100644 --- a/README.md +++ b/README.md @@ -231,8 +231,10 @@ M-g M-n Next occurence ``` C-c g d Popup diff C-c g p Previous hunk -C-c g f Next hunk +C-c g n Next hunk +C-c g r Revert hunk C-c g s Magit status +C-c g f Magit file specific commands C-c g g Magit dispatch popup p Previous section n Next section diff --git a/lisp/my-keys.el b/lisp/my-keys.el index e0f0ec9..16772e2 100644 --- a/lisp/my-keys.el +++ b/lisp/my-keys.el @@ -22,6 +22,7 @@ (global-set-key (kbd "C-c g d") 'git-gutter:popup-hunk) (global-set-key (kbd "C-c g p") 'git-gutter:previous-hunk) (global-set-key (kbd "C-c g n") 'git-gutter:next-hunk) +(global-set-key (kbd "C-c g r") 'git-gutter:revert-hunk) ;; Windows/frames (global-set-key (kbd "") 'windmove-up) @@ -60,6 +61,7 @@ (global-set-key (kbd "C-x C-j") 'direx-project:jump-to-project-root-other-window) (global-set-key (kbd "C-c g s") 'magit-status) (global-set-key (kbd "C-c g g") 'magit-dispatch-popup) +(global-set-key (kbd "C-c g f") 'magit-file-popup) (global-set-key (kbd "") 'flyspell-mode) (global-set-key (kbd "") 'whitespace-mode) (global-set-key (kbd "") 'toggle-truncate-lines) diff --git a/lisp/my-shackle.el b/lisp/my-shackle.el index a9ac44c..5281a85 100644 --- a/lisp/my-shackle.el +++ b/lisp/my-shackle.el @@ -6,7 +6,7 @@ (direx:direx-mode :align left :size 40 :select t) ("*magit-.*-popup*" :regexp t :align right :size 63 :select t) (magit-status-mode :align below :size 20 :select t) - (magit-diff-mode :align right))) + ((magit-diff-mode magit-revision-mode) :align right))) (setq shackle-default-rule '(:align below :select t :size 15)) diff --git a/lisp/my-vc.el b/lisp/my-vc.el index 5070830..b12ea1c 100644 --- a/lisp/my-vc.el +++ b/lisp/my-vc.el @@ -25,10 +25,10 @@ (setq magit-completing-read-function 'ivy-completing-read) (setq magit-display-file-buffer-function #'pop-to-buffer) +(setcdr magit-file-mode-map nil) (global-magit-file-mode) - (require 'vc) (setq vc-follow-symlinks t) (setq vc-handled-backends nil)