Skip to content

Commit

Permalink
add magit-repolist support
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Phillips committed Sep 12, 2016
1 parent 7cfb93d commit c60180d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
19 changes: 19 additions & 0 deletions layers/+source-control/git/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
- [[#git-magit-repolist][Repo List]]

* Description
This layers adds extensive support for [[http://git-scm.com/][git]].
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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=.

** Repo 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:

```
(setq magit-repository-directories
'( "~/Development" ))
```

| Key Binding | Description |
|-------------+------------------------------------------------------------------------|
| ~gL~ | start git repo list |
| ~RETURN~ | show the git status window for the selected project |
| ~g~ | refresh the project list |
6 changes: 6 additions & 0 deletions layers/+source-control/git/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,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
Expand Down Expand Up @@ -154,6 +155,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 "<tab>") 'magit-section-toggle)
(evilified-state-evilify-map magit-repolist-mode-map
:mode magit-repolist-mode
:bindings
(kbd "g") '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
Expand Down

0 comments on commit c60180d

Please sign in to comment.