tools/gist: open gists in non-popups
- Removes +gist/kill-cache (gist-list and gist-list-user with a universal argument already does this). - Removes +gist/open-current. No longer necessary when gists aren't opened in popups. - Makes keybinds more consistent with other "porcelains", like elfeed's or magit.
This commit is contained in:
parent
1f1e4d8d83
commit
3310f9dfe2
3 changed files with 6 additions and 21 deletions
|
@ -467,14 +467,13 @@
|
||||||
(:when (featurep! :tools gist)
|
(:when (featurep! :tools gist)
|
||||||
:after gist
|
:after gist
|
||||||
:map gist-list-menu-mode-map
|
:map gist-list-menu-mode-map
|
||||||
:n "RET" #'+gist/open-current
|
:n "go" #'gist-browse-current-url
|
||||||
:n [return] #'+gist/open-current
|
:n "gr" #'gist-list-reload
|
||||||
:n "b" #'gist-browse-current-url
|
|
||||||
:n "c" #'gist-add-buffer
|
:n "c" #'gist-add-buffer
|
||||||
:n "d" #'gist-kill-current
|
:n "d" #'gist-kill-current
|
||||||
|
:n "e" #'gist-edit-current-description
|
||||||
:n "f" #'gist-fork
|
:n "f" #'gist-fork
|
||||||
:n "q" #'quit-window
|
:n "q" #'kill-this-buffer
|
||||||
:n "r" #'gist-list-reload
|
|
||||||
:n "s" #'gist-star
|
:n "s" #'gist-star
|
||||||
:n "S" #'gist-unstar
|
:n "S" #'gist-unstar
|
||||||
:n "y" #'gist-print-current-url))
|
:n "y" #'gist-print-current-url))
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
;;; tools/gist/autoload/gist.el -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun +gist/open-current ()
|
|
||||||
(interactive)
|
|
||||||
(gist-fetch-current)
|
|
||||||
(when-let* ((win (get-buffer-window "*github:gists*")))
|
|
||||||
(doom/popup-close win)))
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun +gist/kill-cache ()
|
|
||||||
"Clears the gist cache. Necessary when a faulty cache causes gist.el to be
|
|
||||||
entirely unuseable."
|
|
||||||
(interactive)
|
|
||||||
(delete-directory (expand-file-name "gh" pcache-directory) t)
|
|
||||||
(message "gist.el cache cleared"))
|
|
|
@ -7,6 +7,8 @@
|
||||||
(after! gist
|
(after! gist
|
||||||
(set-evil-initial-state! 'gist-list-mode 'normal)
|
(set-evil-initial-state! 'gist-list-mode 'normal)
|
||||||
|
|
||||||
|
(set-popup-rule! "^\\*gist-" :ignore t)
|
||||||
|
|
||||||
(defun +gist*list-render (orig-fn &rest args)
|
(defun +gist*list-render (orig-fn &rest args)
|
||||||
(funcall orig-fn (car args) t)
|
(funcall orig-fn (car args) t)
|
||||||
(unless (cadr args)
|
(unless (cadr args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue