Last active
September 7, 2016 14:21
-
-
Save bltavares/1d853132a0ed9c766820cd2f9f5261d9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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