44

I'm really liking intellij's Distraction Free Mode. However when I try it on my machine, there is this big space on the left side of the screen. For some reason, even if I try to scroll to the left, the space is still there. It's like this huge margin on the left and it's eating a significant amount of space. How do I get rid of that? Here's a screen shot of what I have.

Sample image of intelliJ's DMS on my machine

If you look at this blog, the space on the left side of the screen is very little. I want it to look like that. How do I do that?

enter image description here

Edit: Ok, somehow I discovered that if I hit ctrl + mouse scroll up, the big margin on the left sort of hides itself, but in the process, the text also becomes larger, which isn't really what I was looking for at the moment. The text is just too large by that point.

2
  • 1
    kinda distracting, isn't it? :) actually your screenshot looks horrible, but if you open another source file on the right, side-by-side (the right file goes up to right border, at least on my v15 IJ), then the left margin doesn't look so bad anymore. I think the purpose of this mode is not to code in it all day, but just to go into it when you need to temporarily see more vertically
    – ycomp
    Feb 27, 2016 at 16:34
  • The author of the Scala plugin is Alexander Prodkhalyuzin and he's a big advocate of the distraction free mode (see his presentation at Scala Days 2016: youtu.be/sWikZLIOAEc?list=PLLMLOC3WM2r7kLKJPHKnyJgdiBGWaKlJf) This mode gets you closer to something like a real editor Emacs or vi experience. Especially on smaller screens like Macbook 12", it's a good way to work on code. The issue has been reported to IDEA team: youtrack.jetbrains.com/issue/IDEA-134555 and closed.
    – The Dude
    Sep 8, 2016 at 11:59

4 Answers 4

42

UPDATE: currently, aka 27 Dec 2015, there's an issue opened on their tracker regarding this feature/bug


The same blog you're indicating, states the following

In addition, the text is center-aligned!

This got me thinking, so I played a bit with the right margin features and, as you can see in the pictures below, the 2 seem related:

1. Right margin at 80 I have it at 120 and I can't recall the default value, but this looks like yours. Right margin at 80

2. Right margin at 160 Right margin at 160

In conclusion, the larger the number, the smaller the right margin, and in addition so to speak, the smaller the left margin.

4
  • 2
    Still looks like a work-around for a buggy behavior. Looks like distraction free mode is designed to waste the screen space instead of saving it. Dec 26, 2015 at 12:56
  • @IhorKaharlichenko You may be right, but so far I found very little information regarding this mode, so I can't say for sure and I don't use this mode.
    – Morfic
    Dec 27, 2015 at 18:49
  • 1
    @IhorKaharlichenko If you're interested, a quick search on their bugtracker revealed this issue
    – Morfic
    Dec 27, 2015 at 18:55
  • The current root issue link (the one in the post is marked duplicate): youtrack.jetbrains.com/issue/IDEA-145837 Aug 14, 2018 at 8:40
23

To get rid of the left gap in WebStorm increase the hard wrap value:

Settings > Editor > Code Style > your language > Wrapping and Braces > Hard Wrap at ...

1
  • tnx a lot. it helped me.
    – Reza
    Nov 12, 2022 at 8:18
14

Thank you! Works with IntelliJ 2019.1.1 as well. CTRL+ALT+S -> code style -> increase hard wraps to > 200

IntelliJ Settings

5

The issue has been updated and a better solution is suggested by Tom Gregory. The solution updates the margin used for the distraction free mode.

For anyone coming to this bug looking for a solution, IntelliJ IDEA now offers a setting under Settings > Advanced Settings > Left margin in distraction free mode. Set it to 0 to achieve the desired result.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.