github: move clone command under SPC g h c prefix

This commit is contained in:
syl20bnr 2016-07-04 23:17:30 -04:00
parent 140e779735
commit 8f22e0c8c2
2 changed files with 15 additions and 10 deletions

View File

@ -88,10 +88,13 @@ In the gist list buffer:
** Clone repositories
| Key Binding | Description |
|---------------+--------------------------------------|
| ~SPC g h C-c~ | clone and optionally fork repository |
| ~SPC g h s~ | search for and clone repository |
| Key Binding | Description |
|---------------+----------------------------------------------------------|
| ~SPC g h c /~ | search for a repository to clone it |
| ~SPC g h c c~ | clone and optionally fork repository |
| ~SPC g h c r~ | add a remote that is an existing fork of selected remote |
| ~SPC g h c f~ | fork remote in current user namespace |
| ~SPC g h c u~ | add upstream as remote |
** Browse files

View File

@ -47,16 +47,18 @@
(use-package github-clone
:defer t
:init
(spacemacs/set-leader-keys
"gh C-c" 'github-clone
"ghr" 'github-clone-add-existing-remote
"ghf" 'github-clone-fork-remote
"ghu" 'github-clone-add-source-remote)))
(progn
(spacemacs/declare-prefix "ghc" "clone")
(spacemacs/set-leader-keys
"ghcc" 'github-clone
"ghcr" 'github-clone-add-existing-remote
"ghcf" 'github-clone-fork-remote
"ghcu" 'github-clone-add-source-remote))))
(defun github/init-github-search ()
(use-package github-search
:commands (github-search-clone-repo github-search-user-clone-repo)
:init (spacemacs/set-leader-keys "ghs" 'github-search-clone-repo)))
:init (spacemacs/set-leader-keys "ghc/" 'github-search-clone-repo)))
;; magit-gh-pulls has to be loaded via a pre-config hook because the source code
;; makes assumptions about the status of the magit-mode keymaps that are