I am using PyCharm on Windows and want to change the settings to limit the maximum line length to 79 characters, as opposed to the default limit of 120 characters.
Where can I change the maximum amount of characters per line in PyCharm?
suggestion: Take a look at other options in that tab, they're very helpful
7
votes
You can even set a separate right margin for HTML. Under the specified path:
File >> Settings >> Editor >> Code Style >> HTML >> Other Tab >> Right margin (columns)
This is very useful because generally HTML and JS may be usually long in one line than Python. :)
3
votes
For anyone, or myself if I reload my machine, who this is not working for when you do a code reformat there is an additional option to check under editor->code style->python : ensure right margin is not exceeded. Once this was selected the reformat would work.
1
votes
For PyCharm 2017
We can follow below:
File >> Settings >> Editor >> Code Style.
Then provide values for Hard Wrap & Visual Guidesfor wrapping while typing, tick the checkbox.
NB: look at other tabs as well, viz. Python, HTML, JSON etc.
1
votes
For PyCharm 2019.3.1, I see this.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more