From 116c51520e28bbaca09bd5349f5a0ea875eecfd9 Mon Sep 17 00:00:00 2001 From: duianto Date: Tue, 16 May 2017 15:11:18 +0200 Subject: [PATCH] Add a key binding for magit-find-file problem: currently, viewing a file at a specific branch/commit, requires one to type the magit-find-file command, at the M-x prompt solution: SPC g f f is available and consistent with the SPC f f key binding --- layers/+source-control/git/README.org | 46 +++++++++++++------------- layers/+source-control/git/packages.el | 1 + 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/layers/+source-control/git/README.org b/layers/+source-control/git/README.org index 87d7f8629..7a8d3bfc5 100644 --- a/layers/+source-control/git/README.org +++ b/layers/+source-control/git/README.org @@ -3,29 +3,29 @@ [[file:img/git.png]] * Table of Contents :TOC_4_gh:noexport: - - [[#description][Description]] - - [[#features][Features:]] - - [[#install][Install]] - - [[#layer][Layer]] - - [[#magit-status-fullscreen][Magit status fullscreen]] - - [[#magit-auto-complete][Magit auto-complete]] - - [[#magit-svn-plugin][Magit SVN plugin]] - - [[#global-git-commit-mode][Global git commit mode]] - - [[#git][Git]] - - [[#git-flow][Git-Flow]] - - [[#org-integration][Org integration]] - - [[#working-with-git][Working with Git]] - - [[#magit][Magit]] - - [[#staging-lines][Staging lines]] - - [[#commit-message-editing-buffer][Commit message editing buffer]] - - [[#interactive-rebase-buffer][Interactive rebase buffer]] - - [[#quick-guide-for-recurring-use-cases-in-magit][Quick guide for recurring use cases in Magit]] - - [[#git-flow-1][Git-Flow]] - - [[#git-time-machine][Git time machine]] - - [[#git-links-to-web-services][Git links to web services]] - - [[#repository-list][Repository list]] +- [[#descriptions][Descriptions]] + - [[#features][Features:]] +- [[#install][Install]] + - [[#layer][Layer]] + - [[#magit-status-fullscreen][Magit status fullscreen]] + - [[#magit-auto-complete][Magit auto-complete]] + - [[#magit-svn-plugin][Magit SVN plugin]] + - [[#global-git-commit-mode][Global git commit mode]] + - [[#git][Git]] + - [[#git-flow][Git-Flow]] + - [[#org-integration][Org integration]] +- [[#working-with-git][Working with Git]] + - [[#magit][Magit]] + - [[#staging-lines][Staging lines]] + - [[#commit-message-editing-buffer][Commit message editing buffer]] + - [[#interactive-rebase-buffer][Interactive rebase buffer]] + - [[#quick-guide-for-recurring-use-cases-in-magit][Quick guide for recurring use cases in Magit]] + - [[#git-flow-1][Git-Flow]] + - [[#git-time-machine][Git time machine]] + - [[#git-links-to-web-services][Git links to web services]] + - [[#repository-list][Repository list]] -* Description +* Descriptions This layers adds extensive support for [[http://git-scm.com/][git]]. ** Features: @@ -107,7 +107,7 @@ Git commands (start with ~g~): |-------------+-----------------------------------------------------| | ~SPC g >~ | show submodule prompt | | ~SPC g b~ | open a =magit= blame | -| ~SPC g c~ | clone a repository | +| ~SPC g f f~ | view a file at a specific branch or commit | | ~SPC g f h~ | show file commits history | | ~SPC g H c~ | clear highlights | | ~SPC g H h~ | highlight regions by age of commits | diff --git a/layers/+source-control/git/packages.el b/layers/+source-control/git/packages.el index 92c70e3c2..9eaec0999 100644 --- a/layers/+source-control/git/packages.el +++ b/layers/+source-control/git/packages.el @@ -127,6 +127,7 @@ (spacemacs/set-leader-keys "gb" 'spacemacs/git-blame-micro-state "gc" 'magit-clone + "gff" 'magit-find-file "gfh" 'magit-log-buffer-file "gi" 'magit-init "gL" 'magit-list-repositories