Markdown Configuration
Table of Contents
Markdown Mode
Markdown Mode for markdown files. While I prefer Org-mode for rich-text editing in Emacs, Github primarily supports markdown so I want to be able to edit and view these files when needed.
(use-package markdown-mode :straight t :mode ("\\.\\(m\\(ark\\)?down\\|md\\)$" . markdown-mode) :init (whicher "pandoc") <<markdown_init>> :config (bind-key "A-b" (surround-text-with "+*") markdown-mode-map) (bind-key "s-b" (surround-text-with "**") markdown-mode-map) (bind-key "A-i" (surround-text-with "*") markdown-mode-map) (bind-key "s-i" (surround-text-with "*") markdown-mode-map) (bind-key "A-=" (surround-text-with "`") markdown-mode-map) (bind-key "s-=" (surround-text-with "`") markdown-mode-map))
Set Markdown Mode to use Pandoc
Since Pandoc can be installed on both Linux and in Windows with Chocolatey, set Markdown Mode to use this as the default markdown command.
(setq markdown-command '("pandoc" "--from=markdown" "--to=html5"))
End
(provide 'freemacs-markdown) ;;; freemacs-markdown.el ends here