doomemacs/modules/module-text.el

43 lines
1.2 KiB
EmacsLisp
Raw Normal View History

;;; module-text.el
2015-06-15 15:06:10 +08:00
(use-package markdown-mode
2016-05-20 21:24:05 +08:00
:mode ("\\.m\\(d\\|arkdown\\)$" "/README$"
("/README\\.md$" . gfm-mode))
:init
(add-hook 'markdown-mode-hook 'turn-on-auto-fill)
(setq markdown-enable-wiki-links t
markdown-italic-underscore t
markdown-enable-math t
markdown-make-gfm-checkboxes-buttons t
markdown-gfm-additional-languages '("sh"))
2015-06-15 15:06:10 +08:00
:config
2016-04-19 15:13:48 +08:00
(map! :map markdown-mode-map
"<backspace>" nil
"<M-left>" nil
"<M-right>" nil
;; Assumes you have a markdown renderer plugin in chrome
2016-05-21 10:37:30 +08:00
:nv "M-r" (λ! (doom-open-with "Google Chrome"))
2016-04-19 15:13:48 +08:00
"M-*" 'markdown-insert-list-item
"M-b" 'markdown-insert-bold
"M-i" 'markdown-insert-italic
2016-05-21 10:37:30 +08:00
"M-`" 'doom/markdown-insert-del
2016-04-19 15:13:48 +08:00
(:localleader
:nv "i" 'markdown-insert-image
:nv "l" 'markdown-insert-link
:nv "L" 'markdown-insert-reference-link-dwim
:nv "b" 'markdown-preview)
;; TODO: Make context sensitive
:n "[p" 'markdown-promote
:n "]p" 'markdown-demote
:i "M--" 'markdown-insert-hr))
(use-package markdown-toc :after markdown-mode)
(provide 'module-text)
;;; module-text.el ends here