From cd6b5ed67b8e796a2294876735896370f7bc3251 Mon Sep 17 00:00:00 2001 From: Ryan Phillips Date: Mon, 12 Sep 2016 09:54:26 -0500 Subject: [PATCH] add magit-repolist support fixes #7083 --- layers/+source-control/git/README.org | 19 +++++++++++++++++++ layers/+source-control/git/packages.el | 6 ++++++ 2 files changed, 25 insertions(+) diff --git a/layers/+source-control/git/README.org b/layers/+source-control/git/README.org index 85a6bd45d..f30c7a956 100644 --- a/layers/+source-control/git/README.org +++ b/layers/+source-control/git/README.org @@ -23,6 +23,7 @@ - [[#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 This layers adds extensive support for [[http://git-scm.com/][git]]. @@ -111,6 +112,7 @@ Git commands (start with ~g~): | ~SPC g H h~ | highlight regions by age of commits | | ~SPC g H t~ | highlight regions by last updated time | | ~SPC g I~ | open =helm-gitignore= | +| ~SPC g L~ | open magit-repolist | | ~SPC g s~ | open a =magit= status window | | ~SPC g S~ | stage current file | | ~SPC g m~ | magit dispatch popup | @@ -266,3 +268,20 @@ or lines in a file hosted on Git web services like GitHub, GitLab, Bitbucket... - When the link is opened, the URL is also copied in the kill ring, you can override this behavior by setting the variable =git-link-open-in-browser= to =nil=. + +** Repository list + +This feature will show a list of git directories. The feature needs slight +configuration within your `.spacemacs` config. In the `dotspacemacs/user-config()` +stanza insert the following with the directories of your choice: + +#+BEGIN_SRC emacs-lisp +(setq magit-repository-directories + '("~/Development")) +#+END_SRC + +| Key Binding | Description | +|-------------+-----------------------------------------------------| +| ~SPC g L~ | start git repo list | +| ~RET~ | show the git status window for the selected project | +| ~gr~ | refresh the project list | diff --git a/layers/+source-control/git/packages.el b/layers/+source-control/git/packages.el index 8f23ccdc4..37a09a27d 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 "gfh" 'magit-log-buffer-file + "gL" 'magit-list-repositories "gm" 'magit-dispatch-popup "gs" 'magit-status "gS" 'magit-stage-file @@ -157,6 +158,11 @@ Press [_b_] again to blame further in the history, [_q_] to go up or quit." (require 'git-rebase) ;; bind function keys ;; (define-key magit-mode-map (kbd "") 'magit-section-toggle) + (evilified-state-evilify-map magit-repolist-mode-map + :mode magit-repolist-mode + :bindings + (kbd "gr") 'magit-list-repositories + (kbd "RET") 'magit-repolist-status) (unless (configuration-layer/package-usedp 'evil-magit) ;; use auto evilification if `evil-magit' is not used (evilified-state-evilify-map magit-mode-map