0

There are great in-code documentation standards for python, for example:

Which use some nice, simple ReStructured / Markdown like syntax. Is there a way to have emacs render ReST / Md inside the comments of python code? I.e. the major-mode would still be python.el, and normal python syntax would work; but inside a comment block ('''...''' ) it would be rendered as some sort of markdown.

DilithiumMatrix
  • 17,795
  • 22
  • 77
  • 119

1 Answers1

1

You should be able to achieve this by using the polymode package (https://github.com/vspinu/polymode). It allows you to have multiple major modes in one buffer. Have a look at the screenshot examples.

There are other packages too which can enable multiple major modes in one file: http://www.emacswiki.org/emacs/MultipleModes

homeless
  • 336
  • 1
  • 8