Tuesday, March 24, 2015

IntelliJ IDEA 14.1 - Distraction Free Mode

IntelliJ IDEA 14.1 was released just recently with a good set of new features and improvements. Among other things, one really interesting feature that appeals to me is the new "distraction free mode".

Essentially, entering the distraction free mode means that you'd hide away everything but the editor.

The seasoned IntelliJ IDEA user would now ask, how is it different from "presentation mode" that is already available, or the full screen mode?

This is a very good question! Let's try to answer that! :)

Presentation mode

Presentation mode is designed essentially for delivering presentations. Some of my friends have adopted the presentation mode for actual coding. But to be honest, it only works fine if you have a reasonably large screen and you're not switching between windows while coding. This is how the whole screen looks like when IntelliJ IDEA is in presentation mode:

The default font size in presentation mode is much larger and can be configured in Settings -> Appearance & Behavior -> Appearance. Locate the setting at the bottom of the view:

Full screen mode

Entering the full screen means exactly that. IDE window will span the full screen area. On Mac OS X it also means that it will take the application window to another desktop, which I actually dislike very much, but it's rather a personal preference. In this mode, nothing is changed in the IDE window - all the toolbars, views, etc are preserved.

Notice all the control elements and widgets at the screenshot above?

Distraction free mode

"Distraction free mode" is actually just a fancy name that the marketers came up with :) In fact, it just means that by entering this mode you only keep the editor. This might sound like you're actually entering the presentation mode, it's an incorrect conclusion. In distraction free mode the IDE window doesn't expand to full screen and the fonts are preserved in the original configuration. Basically, we could call this mode as "Hide all toolbars" and it would probably confuse some users less.

At the screenshot above, you can see - it's only the editor that occupies the IDE window. No toolbars, no status bar, no additional views, nothing! So this is exactly what I wanted and I'm really pleased with the new feature! In addition, the text is center-aligned!

What's also cool is that in this mode I can still navigate the same way as I'm used to it in the normal mode. Navigate to the project tree:

... or call out the navigation bar:

Just have to learn the shortcuts ;)

P.S. The new distraction free mode is really cool. However, it is not quite new. In fact, all this was possible long before version 14.1. Even in earlier versions of IntelliJ IDEA you can achieve the same, just not with one mouse click or shortcut press. In the earlier Intellij IDEA versions, in the View menu, you could just hide the toobar, tool buttons, status bar and navigation bar and here you go - you have a "distraction free mode"! :) So the new feature isn't really new. It is rather just a convenience that was added on top of the existing features.


Görge said...

I believe, DFM is *not* the same as you could have achieved in earlier versions.

The (minimal) IntelliJ Help says about DFM:
> In the distraction-free mode, the editor occupies the entire
> IntelliJ IDEA frame, without any editor tabs and tool-window
> buttons. The code is center-aligned.

Though at least 2 of the features already raised discussions:
* "without any editor tabs":
* "code is center-aligned":

arhan said...

Ah god point. Actually, I'm not using editor tabs at all, even in the normal mode, as you may notice from the screenshots :) Thus the code alignment thing was missing, indeed. But overall, it was possible to achieve the same effect and I was taking advantage of it, btw. It is just even more convenient as DFM is a first-class feature in 14.1.

dd101 said...

It was possible before via
Shame I did not fork it on GitHub back then, I was going to fix some glitches + rewrite.groovy
Happy to get it in IntelliJ 14.1

Disqus for Code Impossible