Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
NewsRAD Studio

Focus Mode in RAD Studio 12.2: Just You and Your Code

focus mode in rad studio 12 2 just you and your code 1600x900 2

We have a great productivity feature in Delphi and C++Builder 12.2: focus mode, also known as ‘zen mode’.

A few months ago when we released version 12.1, we added split editor views. This was the most radical change in the IDE since the fully docked design in the mid-2000s: that docked design put a single editor with many tabs in the center of the main window, and our introduction of split editors let you add as many editors as you like in the main window, or any other new window (such as for a second monitor.)

It’s common to build columns of editors so you have code side by side, but it’s incredibly flexible and you can arrange any layout at all.

This technology, where we can now be really flexible with editors, has let us add something possibly even better in version 12.2. Focus mode. It’s where the IDE drops almost all UI, and retains only the code editor, and it’s intended for focused ‘in the zone’ coding sessions.

No menu bars, no title bar, no toolbars, no docked windows. You can even turn off various things inside the editor itself.

The goal: be distraction free.

Just you. Your code. And that’s it.

Focus mode showing a single editor in dark mode

To access Focus mode, press Ctrl+Alt+Z, or right-click on the editor tab and click Focus Mode.

Editor tab context menu showing the new Focus Mode Ctrl+Alt+Z menu item

Advanced Focus Mode

But Focus Mode is more than just a single code editor. It supports split views too. Here’s a composite image showing two side by side split editors in focus mode, in both light and dark mode:

Composite image of light and dark IDE modes with two side by side editors in focus mode

Currently in 12.2 we restrict this to vertical columns, following other tools that, when writing, have tall columns of text. We also have a minimum column width, meaning that if adding a new column would make the editor too small to usefully use, it won’t be enabled. We’d be interested in your feedback here, if this is the sort of pattern that is useful.

Each Focus Mode editor has a few buttons at the top to split the view, and to open a unit (which is how to bring in more units than what it opens with.)

Focus mode's only toolbar

By default Focus Mode opens with a single editor with a single file, but you can also turn on that it when opens it will bring all your tabs with it. That’s in Tools > Options > Editor > Focus Mode, and check the ‘Clone all tabs in Focus mode’ checkbox.

Options dialog showing the Editor > Focus Mode page with various checkboxes to turn editor UI off

Finally, Focus Mode removes most IDE UI. But we have a number of settings to remove even more: to hide editor drawing that might be distracting from the job of just sitting down to code. That includes being able to turn off the blue dots and breakpoints (after all, they’re useful when debugging, but not necessarily when coding), and other items in the editor.

We’re considering adding more things you can turn off here, so that Focus Mode could, if you want it and configure to be, be really minimal. Really emphasise the ‘just code’ aspect.

If you have feedback here, and that includes on all the other improvements we’ve made to the IDE in recent years, we welcome either emails or feature requests!

Distraction-free coding

Distraction-free writing is common across many creative fields. There are many apps for minimalist writing that focus on providing just a text area and as little extra UI as possible. IDEs do this too. And in fact, RAD Studio has done something very similar for many years, possibly before every one of those other apps: you could ‘fullscreen’ a tab by double-clicking it, and it would take up all space except for the toolbars.

In that sense, the main improvement in Focus Mode compared to its ancestor feature are to center code by default (important for wide screens), and hide even more UI than before. Plus, of course, we integrate split editors now that they’re supported in the IDE. Focus Mode is thus revisiting and improving an approach we already took, but making it far more slick and modern, and, of course, even less distracting – far more useful.

Distraction-free writing has its place. When writing articles or a book, I use Scrivener, which is very like an IDE – sidebars, toolbars, and many features for organising and compiling (yes, really). But sometimes you just want to turn on dark mode and fullscreen and have just you and your text. Coding is very similar. There’s a place for docked panels showing structure, files, properties, etc, and there’s a place for the editor containing lots of useful information around your code: breakpoints, 80-character marker, and so forth. But sometimes, you want to just look at your code, turn everything extraneous off, and sit and type and have nothing else onscreen.

That’s Focus Mode.

We hope you’ll find it really boosts your productivity.

See What's New in 12.2 Athens See What's New in 12.2 Athens Dev Days of Summer 2-24

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

David is an Australian developer, currently living in far-north Europe. He is the senior product manager for C++ at Idera, looking after C++Builder and Visual Assist.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES