
Starting with ReSharper 2022.2, you can choose your personal code style, even if the team uses another. Not all tools let you configure the indentation width or even behave a bit differently once you throw tabs at them. So why is that? As Tim Corey points out – and that might be true for a lot of us – it’s about habit and how comfortable we feel. But even though the importance of accessibility is understood almost irrevocably, many developers still prefer spaces over tabs. This is very crucial for visually impaired people who often rely on bigger fonts and wider monitors and thus need to adapt their tab width. When you use tabs, each developer can have their own personal indentation settings.

That is for the simple reason that they increase the accessibility of your codebase. Spaces allow for more precise alignmentĭespite the fact that spaces are used in 80% of C# files and that they correlate with an 8.6% higher salary, the objective truth is that tabs may indeed be the better choice.Tabs require fewer keystrokes for indentation.Spaces look the same in all editors and tools.What was it about again?Īs a quick refresher and for those who haven’t heard about it yet, here are the pros and cons of spaces versus tabs without any rating:

In this blog post, we will introduce you to ReSharper’s Virtual Formatter, that helps you settle this particular infamous argument and even a couple more issues beyond accessibility and “the void’. The topic became so widespread that it made it into an episode of “Silicon Valley”. For decades, developers have had heated debates about tabs and spaces in their source code.
