Pycharm and RST

This is how to edit reStrucuturedText (rst) files in Pycharm 4. First install docutils in your Python environment:

pip install docutils

Next, from the Pycharm menu bar select: Run>Edit Configurations. Add a Python docs>Docutils task. Then fill in the form as follows:

Screenshot from 2015-01-22 14:00:32

When you run this, it will convert your file to HTML. Under the View menu there is a menu item to display the HTML in a browser.

Also, rst does not like hard returns. This means that paragraphs have to be a long line. I tried setting up the editor for soft wraps but I found it more difficult to write Python code.

Happy rst-ing.


3 thoughts on “Pycharm and RST

  1. Pingback: Any sensible ReST editor for Pycharm? - PKT
  2. “”but I found it more difficult to write Python code.””” Is that mean your code line are too long? maybe 100 chars is ok.

    • No. Often when I am writing python, I start out not worrying about line length. Once I have a section done, I go back and clean it up to comply with PEP 8. I found the soft wraps distracting. Since I spend 99% of my time writing Python and %1 of my time writing RST, I chose the editor settings that I like best for Python.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s