From 551a659cb37d0924c87b54bf6736ce77def96a5b Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Thu, 7 May 2020 11:14:51 -0400 Subject: [PATCH] Add git-link --- emacs/init.org | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/emacs/init.org b/emacs/init.org index 547c9ac..2915e7b 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -378,6 +378,28 @@ Evil keybindings for magit! (setq transient-default-level 7) #+END_SRC +* git-link +Open files in Git forges (GitHub, GitLab, etc.): +#+BEGIN_SRC emacs-lisp + (use-package git-link + :init + (defun git-link-copy () + (interactive) + (let ((git-link-open-in-browser nil)) + (call-interactively 'git-link))) + (leader-def-key "gl" #'git-link) + (leader-def-key "gy" #'git-link-copy) + :custom + (git-link-open-in-browser t) + (git-link-remote-alist '(("git.sr.ht" git-link-sourcehut) + ("github" git-link-github) + ("bitbucket" git-link-bitbucket) + ("gitorious" git-link-gitorious) + ("gitlab" git-link-gitlab) + ("visualstudio\\|azure" git-link-azure) + ("git.jeremydormitzer.com" git-link-bitbucket)))) +#+END_SRC + * with-editor A utility from the author of Magit to run shell commands using the current Emacs instance as $EDITOR.