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
You can change the Hard wrap at param
You can change the max column width from: File > Settings > Editor > Code Style > Right Margin (columns)
In File | Settings, select "Editor", then "Code Style". There is an option "Wrap when typing reaches right margin".
Edit: Just tried it, and it doesn't seem to work. Anyway, maybe the option "Use soft wrap" in the "General" group is more what you want.
MacOS:
There is a filed right to the 'Hard wrap at' - you can enter needed about of symbols you need
To move the grey vertical line, that tells Android Studio where to wrap your code, go to
Settings- Editor- Code Style- Java or Kotlin- Wrapping and Braces- Hard wrap at
and enter the number of characters, where the line should be.
@Solace, actually @Fahim Faysal's answer is quite close to what you need, but since you want to solve the problem no matter how long a statement I type on a single line, it never automatically goes to the next line
, 2 more steps you need to follow:
[Step 9] type the max length you prefer at `"Hard wrap at" ()
[Step 10] change "Wrap on typing" from Default: No or No to Yes