Stephan
Stephan

Reputation: 16769

Centre code in Android Studio/IntelliJ IDEA editor

I would like to centre my code in the Android Studio's/IntelliJ's editor, like as it is done in the Distraction Free Mode.

Right now, it is always aligned on the left side of the editor, but I want to have it in the centre of the window. I could not find any option for this in the settings. Is this possible without entering the Distraction Free Mode?

Upvotes: 46

Views: 12611

Answers (2)

David Palita
David Palita

Reputation: 1293

You can also activate this option through the registry:

  1. Type shift shift to search everywhere
  2. Type registry and select "Registry..."
  3. Type distraction to filter the list
  4. Check the box for "editor.distraction.free.mode"
  5. Close the registry

Voilà, no restart needed.

Upvotes: 35

CrazyCoder
CrazyCoder

Reputation: 402433

Add -Deditor.distraction.free.mode=true in Help | Edit Custom VM Options and restart the IDE. This will center the editor without the other features of the distraction free mode (like hidden tool windows).

Upvotes: 109

Related Questions