doomemacs/modules/module-text.el

37 lines
1,021 B
EmacsLisp
Raw Normal View History

;;; module-text.el
2015-06-15 09:06:10 +02:00
(use-package markdown-mode
2016-04-05 23:58:32 -04:00
:mode ("\\.md$" "/README$")
2015-09-30 13:47:57 -04:00
:init
2016-04-19 03:13:48 -04:00
(add-hook 'markdown-mode-hook 'turn-on-auto-fill)
2015-06-15 09:06:10 +02:00
:config
2016-04-19 03:13:48 -04:00
(map! :map markdown-mode-map
"<backspace>" nil
"<M-left>" nil
"<M-right>" nil
;; Assumes you have a markdown renderer plugin in chrome
:nv "M-r" (λ! (narf-open-with "Google Chrome"))
"M-*" 'markdown-insert-list-item
"M-b" 'markdown-insert-bold
"M-i" 'markdown-insert-italic
"M-`" 'narf/markdown-insert-del
(: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)
2016-04-16 21:25:18 -04:00
(use-package markdown-toc :commands (markdown-toc-generate-toc)))
2015-06-15 09:06:10 +02:00
(provide 'module-text)
;;; module-text.el ends here