Add git-link package and configure it (also add info on the readme

This commit is contained in:
Diego Berrocal 2015-03-27 12:17:55 -04:00 committed by syl20bnr
parent b8e617c886
commit 610eeddfd5
2 changed files with 27 additions and 0 deletions

View file

@ -26,6 +26,7 @@
- [magit-gh-pulls](#magit-gh-pulls)
- [gist.el](#gistel)
- [github-browse-file](#github-browse-file)
- [git-link](#git-link)
<!-- markdown-toc end -->
@ -346,6 +347,23 @@ In the gist list buffer:
----------------------|------------------------------------------------------------
<kbd>SPC g f b</kbd> | browse to file on github
### git-link
Key Binding | Description
----------------------|------------------------------------------------------------
<kbd>SPC g f l</kbd> | browse to file on github/bitbucket/etc (on current line possition)
<kbd>SPC g f c</kbd> | browse to file on github/bitbucket/etc (on current line at commit)
Pro Tip: if you have multiple remotes, try prepending `SPC u` to the calls to the git-link
Pro Tip #2: You can select a region and use git-link to have the whole region selected in the link
Pro tip #3: The link is openned automatically, but it's copied to the clipboard
too if you don't want for any reason to have the link opened all the time, put this on your `dotspacemacs/config`:
```elisp
(setq git-link-open-in-browser nil)
```
[git]: http://git-scm.com/
[download page]: http://git-scm.com/downloads
[git-gutter]: https://github.com/syohex/emacs-git-gutter-fringe

View file

@ -21,6 +21,7 @@
git-timemachine
gist
github-browse-file
git-link
;; not up to date
;; helm-gist
magit
@ -322,6 +323,14 @@ which require an initialization must be listed explicitly in the list.")
(evil-leader/set-key
"gfb" 'github-browse-file)))
(defun git/init-git-link ()
(use-package git-link
:init
(evil-leader/set-key
"gfl" 'git-link
"gfc" 'git-link-commit)
(setq git-link-open-in-browser t)))
(defun git/init-magit-gitflow ()
(use-package magit-gitflow
:commands turn-on-magit-gitflow