From 0a0115957250fd3fc12dda86b1a8d48514ee67bd Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Thu, 28 Jul 2016 23:21:36 -0400 Subject: [PATCH] git: add SPC g f h to get the commit history of the current file --- layers/+source-control/git/README.org | 1 + layers/+source-control/git/packages.el | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/layers/+source-control/git/README.org b/layers/+source-control/git/README.org index 4700dbd03..8c2eeb42b 100644 --- a/layers/+source-control/git/README.org +++ b/layers/+source-control/git/README.org @@ -106,6 +106,7 @@ Git commands (start with ~g~): |-------------+-----------------------------------------------------| | ~SPC g >~ | show submodule prompt | | ~SPC g b~ | open a =magit= blame | +| ~SPC g f h~ | show file commits history | | ~SPC g H c~ | clear highlights | | ~SPC g H h~ | highlight regions by age of commits | | ~SPC g H t~ | highlight regions by last updated time | diff --git a/layers/+source-control/git/packages.el b/layers/+source-control/git/packages.el index 0a5434eea..aa8bdc395 100644 --- a/layers/+source-control/git/packages.el +++ b/layers/+source-control/git/packages.el @@ -120,12 +120,14 @@ (setenv "GIT_ASKPASS" "git-gui--askpass")) ;; key bindings (spacemacs/declare-prefix "gd" "diff") + (spacemacs/declare-prefix "gf" "file") (spacemacs/set-leader-keys - "gb" 'spacemacs/git-blame-micro-state - "gm" 'magit-dispatch-popup - "gs" 'magit-status - "gS" 'magit-stage-file - "gU" 'magit-unstage-file) + "gb" 'spacemacs/git-blame-micro-state + "gfh" 'magit-log-buffer-file + "gm" 'magit-dispatch-popup + "gs" 'magit-status + "gS" 'magit-stage-file + "gU" 'magit-unstage-file) ;; transient state ;; TODO use transient state instead of old micro-state, IIRC we continue ;; to use micro-state because of the re-entry keyword :on-enter which is