Skip to content

Instantly share code, notes, and snippets.

@bltavares
Last active September 7, 2016 14:21
Show Gist options
  • Save bltavares/1d853132a0ed9c766820cd2f9f5261d9 to your computer and use it in GitHub Desktop.
Save bltavares/1d853132a0ed9c766820cd2f9f5261d9 to your computer and use it in GitHub Desktop.
(defconst artist-packages '((artist :location built-in)))
(defun artist/toogle-emacs-state ()
"Toggle emacs-state when `artist-mode' is toggled."
(unless (eq dotspacemacs-editing-style 'emacs)
(if artist-mode
(unless (evil-emacs-state-p)
(evil-emacs-state))
(evil-exit-emacs-state))))
(defun artist/init-artist ()
;; `artist-mode' utilizes the mouse, and works better in emacs state, so we
;; automatically toggle emacs state on/off together with artist-mode (unless
;; the editing style is emacs)
(add-hook 'artist-mode-hook #'artist/toogle-emacs-state)
(spacemacs/set-leader-keys
"aa" #'artist-mode)
(evil-define-minor-mode-key 'emacs 'artist-mode
"q" #'artist-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment