Ensure that :w runs gist-mode-save-buffer in gist-mode buffers

This commit is contained in:
Jeremy Dormitzer 2020-01-13 14:10:13 -05:00
parent 472e2b1584
commit b2b46c04a6

View File

@ -153,6 +153,14 @@ Make undo not undo paragraphs at a time:
(setq evil-want-fine-undo t)
#+END_SRC
Add a convenience function for making buffer-local ex-commands:
#+BEGIN_SRC emacs-lisp
(defun evil-ex-define-local-cmd (cmd function)
(set (make-local-variable 'evil-ex-commands) (copy-tree evil-ex-commands))
(evil-ex-define-cmd cmd function))
#+END_SRC
** evil-collection
A collection of evil bindings for various modes
#+BEGIN_SRC emacs-lisp
@ -4626,7 +4634,11 @@ Add a function to power the [[https://orgmode.org/worg/org-contrib/alfred-org-ca
* gist.el
[[https://github.com/defunkt/gist.el][Integrate with GitHub gists]] from Emacs!
#+BEGIN_SRC emacs-lisp
(use-package gist)
(use-package gist
:config
(add-hook 'gist-mode-hook
(lambda ()
(evil-ex-define-local-cmd "w[rite]" 'gist-mode-save-buffer))))
#+END_SRC
* ffap