:gbrowse and :gbissues
This commit is contained in:
parent
384b775ace
commit
ac9263c1e5
2 changed files with 17 additions and 3 deletions
|
@ -1,7 +1,19 @@
|
||||||
;;; defuns-git.el
|
;;; defuns-git.el
|
||||||
|
|
||||||
;;;###autoload (autoload 'doom:git-remote-browse "defuns-git" nil t)
|
;;;###autoload
|
||||||
(evil-define-command doom:git-remote-browse (&optional bang)
|
(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
|
"Open the website for the current (or specified) version controlled FILE. If
|
||||||
BANG, then use hub to do it."
|
BANG, then use hub to do it."
|
||||||
(interactive "<!>")
|
(interactive "<!>")
|
||||||
|
|
|
@ -48,8 +48,10 @@
|
||||||
|
|
||||||
;; GIT
|
;; GIT
|
||||||
(ex! "ga[dd]" 'doom/vcs-stage-hunk)
|
(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! "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
|
;; Dealing with buffers
|
||||||
(ex! "k[ill]" 'doom/kill-real-buffer) ; Kill current buffer
|
(ex! "k[ill]" 'doom/kill-real-buffer) ; Kill current buffer
|
||||||
(ex! "k[ill]all" 'doom:kill-all-buffers) ; Kill buffers (bang = in project)
|
(ex! "k[ill]all" 'doom:kill-all-buffers) ; Kill buffers (bang = in project)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue