diff --git a/core/defuns/defuns-git.el b/core/defuns/defuns-git.el index b1bf9c5ee..37a85ce72 100644 --- a/core/defuns/defuns-git.el +++ b/core/defuns/defuns-git.el @@ -1,7 +1,19 @@ ;;; defuns-git.el -;;;###autoload (autoload 'doom:git-remote-browse "defuns-git" nil t) -(evil-define-command doom:git-remote-browse (&optional bang) +;;;###autoload +(defun doom/git-root () + (awhen (car-safe (browse-at-remote/remote-ref buffer-file-name)) + (cdr (browse-at-remote/get-url-from-remote it)))) + +;;;###autoload +(defun doom/git-issues () + "Open the github issues page for current repo." + (interactive) + (awhen (doom/git-root) + (browse-url (concat it "/issues")))) + +;;;###autoload (autoload 'doom:git-browse "defuns-git" nil t) +(evil-define-command doom:git-browse (&optional bang) "Open the website for the current (or specified) version controlled FILE. If BANG, then use hub to do it." (interactive "") diff --git a/private/my-commands.el b/private/my-commands.el index 74b7a9e78..76b92d8c1 100644 --- a/private/my-commands.el +++ b/private/my-commands.el @@ -48,8 +48,10 @@ ;; GIT (ex! "ga[dd]" 'doom/vcs-stage-hunk) -(ex! "gbr[owse]" 'doom:git-remote-browse) ; show file in github/gitlab (ex! "gre[vert]" 'doom/vcs-revert-hunk) +(ex! "gbr[owse]" 'doom:git-browse) ; show file in github/gitlab +(ex! "gbi[ssues]" 'doom/git-issues) ; show github issues + ;; Dealing with buffers (ex! "k[ill]" 'doom/kill-real-buffer) ; Kill current buffer (ex! "k[ill]all" 'doom:kill-all-buffers) ; Kill buffers (bang = in project)