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.

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.