Android Studio disable line wrap

Viewed 35849

I have this strange line wrap on Android Studio and I want to disable because it freaks me out...

enter image description here

11 Answers

If you're wondering how to do this for Flutter/Dart, here's how:

  1. File -> Settings -> Code Style -> Dart
  2. Change the Line length field to something bigger than the default (I'm using 300)

enter image description here

This should work for any programming language.

Right click near the line numbers for the soft wrap option to pop up.

enter image description here

In Android Studio 3.5.3 you can set the soft wrap to line up with the orginal lines indent AND set an additional indent spaces. Makes it easier for me to read Settings --> Editor --> General

settings screenshot

I found helpful that in the current version (Android Studio 3.2) you can set the soft wrap indicators to show only in the current line in adition to using soft wraps in editor.

Check the Show soft wrap indicators for current line only in:

Editor -> General -> Soft Wraps

enter image description here

There is also the auto-line breaking issue, where AS will automatically add hard line returns in long lines. I found the setting for this in Preferences > Editor > Code Style > Hard wrap at [X] and []wrap on typing.

Android Studio 4.1.3:

Preferences > Code Style > uncheck wrap on typing

Related