cajsaico
cajsaico

Reputation: 351

Why is there a right margin line in Android Studio editor window?

There is a vertical line in the middle of the file editor window in Android Studio. I'm unable to change the margin line. Below is the screenshot of the right margin line:

enter image description here

Where is the setting to change this line?

Upvotes: 29

Views: 11995

Answers (5)

Sayooj
Sayooj

Reputation: 842

That line historically represents the margin of A4 paper, that is useful only if you need to print the code. Old school says that you should keep your code inside that margin, to guarantee much portability.

But.. nowadays in the real life it makes no sense, because we always use advanced editors, bigger displays, and I never have to print any single line of code..

To remove the line in the latest Android Studio version Android Studio Chipmunk | 2021.2.1 Patch 1 ,

File->Settings->Editor->General->Show hard wrap guide

or just search hard wrap in settings window and uncheck the Foreground and click apply.

enter image description here

Upvotes: 0

Johan Jimenez
Johan Jimenez

Reputation: 41

To disable In Android Studio 4.

File > Settings > Editor > Code Style > "Select the programing languae"** > Line length

Set it to: 300 for example.

Screenshot

Upvotes: 3

Lomanto
Lomanto

Reputation: 79

If you are using Dart language:

settings -> Code Style -> Dart

and set Line length to your preference.

Upvotes: 4

Vitor
Vitor

Reputation: 192

For the new Android Studio the location is: Editor > Code Style > Hard wrap at. The standard value is 100, just change to 0

Upvotes: 2

Ahmad
Ahmad

Reputation: 72573

I guess you mean this line?

enter image description here

That's a ruler for the max column width.

You can change the max column width from:
File > Settings > Editor > Code Style > Right Margin (columns)

enter image description here

Upvotes: 71

Related Questions