IntelliJ IDE: How to add one or more margins

Solution 1:

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.

Solution 2:

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

Solution 3:

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