4

I like PyCharm a lot. I write a good chunk of python for my job. I want to conform to PEP8 and it's line length suggestions as best as possible. Having right margins for 72 characters, 79 characters, and 99 characters is very important to me. However, within the current IntelliJ family of IDEs, a user can only specify one right margin as shown by this screenshot.

Does anyone know of a plugin that allows a user to add more right margins? Or more right rulers (I don't need/want my code to be able to wrap at each vertical line)?

1

3 Answers 3

4

The only thing I was able to find is that with sublime text you can specify as many margins as you want, it is called rulers though. But Sublime text is not an IDE and doesn't implement as many features as PyCharm. I guess multiple margins isn't a feature that comes with IntelliJ products.

4

Well what do you know! The latest release of PyCharm (2017.3) has this feature, just when I decided to look for it.

Quoting Rustam Vishnyakov from the link Florian posted:

You can set it up at Settings|Editor|Code Style|Visual guides for all languages or on "Wrapping and Braces" tab for a specific language ("Other" tab for XML/HTML). You can change the visual indent guide color at Settings|Editor|Color Scheme|General|Guides|Visual guides.

It works marvelously. My goal is to keep the docstrings within the 80 character limit (or maybe 72), and the code within 120 characters.

Pycharm with visual guides

1
  • 1
    PEP8 suggest to limit to 79 characters - not 80, not 120, 79. Docstrings at 72.
    – MERose
    Commented Sep 7, 2021 at 13:07
2

I just noticed on my version of IntelliJ that it supports multiple visual guides: Settings > Code Style > Visual Guides. You can enter multiple comma-separated values and you will get multiple right margin lines

IntelliJ ver 2019.1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .