How do I change "new Line" in IntelliJ IDEA when auto format code

Viewed 22

Every time when I want to reformat my code in IntelliJ IDEA it starts a new line when the text reaches this white line. But I don't want it there I want it further right. How do I change it?

enter image description here

2 Answers

Change your margin width

enter image description here

My version: IntelliJ IDEA 2022.2.1 (Ultimate Edition).

IntelliJ is just doing what you asked it to, what the prefs specify.

In Mac PyCharm, click CMD-, (comma) prefs -> Editor -> Code Style -> Hard wrap at: N columns

Either adjust N to your favorite value, or untick the "wrap on typing" checkbox.

Other JetBrains products will offer similar dialogs.

Related