How can I set a maximum length for Android Studio\'s code editor, or may be set a word wrap?
In my Android Studio, no matter how long a statement I type on a single
If you need not a soft wrap,
but actually, brake one long line onto several lines you need:
Go to Preferences -> Editor -> Code style -> Java/Kotlin -> Wrapping and braces (tab) -> Check "Ensure that right margin is not exceeded"
Now try to reformat your code:
press
OPTION (ALT) + CMD + L on your Mac
(or CTRL + ALT + L on PC)
Edit 13.02.19
As noted in comments this option seems not available in settings for Kotlin.
However, there is a workaround to manually add it.
Here is what it takes to make it work:
Export the settings scheme.
Open saved xml file.
tag (or create)Add the WRAP_LONG_LINES setting manually:
...