2017-06-08 11:47:56 +02:00
|
|
|
;;; tools/gist/autoload/evil.el -*- lexical-binding: t; -*-
|
2022-08-12 20:29:19 +02:00
|
|
|
;;;###if (modulep! :editor evil)
|
2017-05-07 15:10:46 +02:00
|
|
|
|
|
|
|
;;;###autoload (autoload '+gist:send "tools/gist/autoload/evil" nil t)
|
2017-06-08 11:47:56 +02:00
|
|
|
(evil-define-operator +gist:send (bang)
|
2017-05-17 21:07:58 +02:00
|
|
|
"Create a private gist from the buffer. If BANG then make it public."
|
2017-05-07 15:10:46 +02:00
|
|
|
:type inclusive :repeat nil
|
2017-06-08 11:47:56 +02:00
|
|
|
(interactive "<!>")
|
2017-05-07 15:10:46 +02:00
|
|
|
(if bang
|
2017-05-17 21:07:58 +02:00
|
|
|
(gist-region-or-buffer)
|
|
|
|
(gist-region-or-buffer-private)))
|
2017-05-07 15:10:46 +02:00
|
|
|
|
|
|
|
;;;###autoload (autoload '+gist:list "tools/gist/autoload/evil" nil t)
|
|
|
|
(evil-define-command +gist:list (&optional username)
|
2017-05-17 21:07:58 +02:00
|
|
|
"Pop up a listing of gists."
|
2017-05-07 15:10:46 +02:00
|
|
|
(interactive "<a>")
|
|
|
|
(if username
|
|
|
|
(gist-list-user username)
|
|
|
|
(gist-list)))
|