4

I like to use the markdown-mode for READMEs.

And I would like to use the markdown-mode as a minor-mode for comments in other major-modes like sh-mode. Is this possible somehow?

3
  • 1
    You seem to be confused about major and minor modes. markdown-mode is a major mode of which only one is active at a time. Minor modes serve a completely different purpose, enhancing a major mode in a possibly unrelated way. What you're looking for is a multi-mode combining major modes...
    – wasamasa
    Jul 6, 2018 at 17:13
  • 3
    @wasamasa One could also interpret the question as: Is there a minor mode that acts like markdown-mode in comments (maybe restricted to buffers having major-modes derived from prog-mode). In that case I would say it is an interesting question.
    – Tobias
    Jul 7, 2018 at 4:08
  • @Tobias That I am looking for.
    – ceving
    Jul 9, 2018 at 8:12

1 Answer 1

3

A markdown-minor-mode would be nice, yes. I currently have some ad-hoc code to highlight comments assuming markdown syntax for my typer-mode. It only supports a limited subset of markdown and only performs highlighting, but it shouldn't be difficult to extract it into its own markdown-minor-mode (probably easier than to try and adapt the code from markdown-mode major mode).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.