Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple right margins in Pycharm

I am learning Pycharm Community Edition 3.4 and I was wondering If it was possible to have a right a margin for comments and docstring only, additionally to the regular margin for the rest of the code.

I ask because I am trying to stick to the PEP8 guideline of 72 characters per comment and 79 for regular code. I am constantly changing the right margin between 72/79 to make sure everything is fine but I don't find that very efficient.

Thanks in advance.

like image 621
chris from local group Avatar asked Jun 09 '14 17:06

chris from local group


People also ask

How do I show indentation in PyCharm?

You can reformat line indents based on the specified settings. While in the editor, select the necessary code fragment and press Ctrl+Alt+I . If you need to adjust indentation settings, in the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | Code Style.


1 Answers

This feature was announced in September 2017.

Go to File -> Settings -> Editor -> Code Style -> Hard wrap at and Visual guides. For visual guides, you can enter multiple values separated by commas.

Visual guides settings Visual guides example

like image 58
florisla Avatar answered Sep 22 '22 05:09

florisla