AnhTuan
AnhTuan

Reputation: 285

How to customize the hard wrap vertical line in Android Studio IDE for code formatting

When I apply "Format code" my lines of code automatically down line (many lines) even though my screen has enough space to display it on 1 line.

enter image description here

I see it depends on the vertical line (red in the image), how can I remove this line or widen it?

My language is: Dart

Upvotes: 11

Views: 4923

Answers (1)

Ankit Kumar Maurya
Ankit Kumar Maurya

Reputation: 1207

You can disable the line from File->Settings->Editor->Appearance and then uncheck 'Show hard wrap and visual guides'.

You can take reference from these two images:

'Show hard wrap and visual guides' checked With line

'Show hard wrap and visual guides' unchecked Without line

Also you can customize it from the 'Code Style' option in the same(Editor) dropdown.

For your reference: Hard wrap with value 50: Hard wrap 50

Hard wrap with value 100: Hard wrap 100

Edit: for flutter development you need to the change the line length for auto formatting in dart option in the code style dropdown. Like this: Dart formatting

A lot of customizations could be done according to the need.

Upvotes: 20

Related Questions