diff --git a/modules/module-text.el b/modules/module-text.el index 9f3075f86..be59ab048 100644 --- a/modules/module-text.el +++ b/modules/module-text.el @@ -7,36 +7,32 @@ markdown-wrap-or-insert markdown-unwrap-thing-at-point) :init - (add-hook 'markdown-mode-hook 'narf|enable-hard-wrap) + (add-hook 'markdown-mode-hook 'turn-on-auto-fill) :config - (sp-local-pair 'markdown-mode "```" "```" - :post-handlers '(("||\n[i]" "RET")) - :unless '(sp-point-before-word-p sp-point-before-same-p)) + (map! :map markdown-mode-map + "" nil + "" nil + "" nil - (map! (:map markdown-mode-map - "" nil - "" nil - "" nil + ;; Assumes you have a markdown renderer plugin in chrome + :nv "M-r" (λ! (narf-open-with "Google Chrome")) - ;; 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 - "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) - (: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 - ;; TODO: Make context sensitive - :n "[p" 'markdown-promote - :n "]p" 'markdown-demote - - :i "M--" 'markdown-insert-hr)) + :i "M--" 'markdown-insert-hr) (use-package markdown-toc :commands (markdown-toc-generate-toc)))