diff --git a/contrib/git/README.md b/contrib/git/README.md index 502f03a64..cf21bd3ab 100644 --- a/contrib/git/README.md +++ b/contrib/git/README.md @@ -15,6 +15,7 @@ - [Github support](#github-support) - [magit-gh-pulls](#magit-gh-pulls) - [gist.el](#gistel) + - [github-browse-file](#github-browse-file) @@ -225,3 +226,10 @@ In the gist list buffer: [git-messenger]: https://github.com/syohex/emacs-git-messenger [magit-gh-pulls]: https://github.com/sigma/magit-gh-pulls [gist.el]: https://github.com/defunkt/gist.el + +### github-browse-file + + Key Binding | Description +----------------------|------------------------------------------------------------ +SPC g f b | browse to file on github + diff --git a/contrib/git/packages.el b/contrib/git/packages.el index dfbd91a92..3ec5ae083 100644 --- a/contrib/git/packages.el +++ b/contrib/git/packages.el @@ -14,6 +14,7 @@ which require an initialization must be listed explicitly in the list.") (mapc (lambda (x) (push x git-packages)) '( gist + github-browse-file ;; not up to date ;; helm-gist magit-gh-pulls @@ -197,6 +198,13 @@ which require an initialization must be listed explicitly in the list.") :init (add-hook 'magit-mode-hook 'turn-on-magit-gh-pulls) :config (spacemacs|diminish magit-gh-pulls-mode "Github-PR"))) +(defun git/init-github-browse-file () + (use-package github-browse-file + :defer t + :init + (evil-leader/set-key + "gfb" 'github-browse-file))) + (defun git/init-magit-gitflow () (use-package magit-gitflow :commands turn-on-magit-gitflow