Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use markdown for python with pycharm?

I'm new to python and I've been using PyCharm (4.5 Community Edition) as my IDE on a Mac OS X v11 system. I've installed the markdown plug-in and enabled the package in pycharm (Actions>Plugins>Markdown is checked, program restart complete).

When I create a new markdown file (test.md or test.markdown) I can see the preview tab. But I don't see anything in the preview tab. Also, I can't "run / execute" this file. So seeing a preview would be nice. Ideally, I would like to be able to execute python chunks with markdown comments in-between and see the output rendered in a local browser if this at all is possible.

This was really easy in the Rstudio IDE and a super powerful way to communicate findings.

Any suggestions? Help much appreciated.

like image 495
user3055034 Avatar asked Nov 13 '15 23:11

user3055034


Video Answer


3 Answers

Currently PyCharm has two plugin options for .md format: PlantUML and Mermaid.

According to the official docs, in order to enable md support:

  • Go to File -> Languages & Frameworks -> Markdown.
  • Install either of these plugins.
  • Close and Reopen PyCharm (it did not work instantly for me)
  • In order to see a file preview move a mouse to the upper right corner and select this option.

enter image description here

enter image description here

like image 54
vitaliis Avatar answered Sep 19 '22 10:09

vitaliis


The default setting for Markdown files - with a fresh copy of Pycharm - is preview mode only:

preview_only_mode

Just change it to side-by-side mode:

sidebyside_mode

No requirement to install additional plug-ins.

https://www.jetbrains.com/help/idea/markdown.html#preview

like image 35
rustyMagnet Avatar answered Sep 17 '22 10:09

rustyMagnet


  1. Uninstall Markdown Support (by Jetbrains) (has no side preview)

  2. Install Markdown Navigator 2.0 (by Vladimir Schneider) (has side-preview)

https://github.com/vsch/idea-multimarkdown

This should give you a per-compiled side view of you .md file.

screenshot

like image 41
Kirill Kondratiev Avatar answered Sep 19 '22 10:09

Kirill Kondratiev