git: add SPC g f h to get the commit history of the current file

This commit is contained in:
syl20bnr 2016-07-28 23:21:36 -04:00
parent 1c4f685b13
commit 0a01159572
2 changed files with 8 additions and 5 deletions

View File

@ -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 |

View File

@ -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