Being a compulsive person of sorts like me, means that you pay special attention to insignificant details that are usually disregarded by others. In this sense, setting the IDE to show white spaces and tabs is important for me to keep the source files (of any kind) consistent.
To enable this feature in IntelliJ, you must open the Settings dialog (
Ctrl+Alt+S) and navigate to the Editor | General | Appearance tab.
In this tab you need to enable the
Show whitespace option. In addition, you can individually enable/disable which whitespaces to show: leading, trailing or inner.
You can see the result of enabling this option in the next screenshot. I know some people might find this distracting or even disturbing, but if you're like me, it'll give you peace of mind.