How to change the tab character in IntelliJ IDEA when showing whitespaces?

Answered

Hi,
I've been using Eclipse at work for a few years now and decided to try another IDE for a personal project. I chose IntelliJ IDEA because I like how it looks and because of all the positive opinions I heard and read about it. However, I'm one of those weird people who can't edit a text without having whitespaces showing. On top of that, the whitespace characters must be visible but unobtrusive, just like the ones in TextPad and Eclipse (single or double guillemets).

The arrow, whether in IntelliJ or Notepad++ is just too much to bear for my eyes. Is it possible to change that character? I must confess that I've never seen any editor that allowed users to change that specific character BUT if I were on an editor dev team, I would implement it AND, IntelliJ being that "configurable", I hope there's a way. Unfortunately, I haven't found it so I was hoping a knowledgeable user would know enough to enlighten me as to whether this is possible and if so, how.

Thanks!

8 comments

Hi Amenel,

No, it's not possible to change tab symbols representation at the moment.

How do you see such a configuration facility? E.g. let's say you want to change current tab symbol representation to something different - what do you want to get and how do you want to configure it?

Regards, Denis

0

Hi Denis,
thanks for your reply. Before I answer your question, please bear in mind that I am an advocate of "configurability" and the more a program/application is "tweakable", the more I, as a user, feel comfortable using it, all the more since I, as a developer, know it isn't that much more difficult to allow a user to pick a color or define their own shortcuts. That "tweakability" is probably the number one reason why I use Opera and don't use Mac OS X. What I'm trying to say is that making a program "my own" is important.

That being said, I'm at work now so no running instance of the program to see how the settings look like in IDEA. But what I see in general in an IDE is this: in the global editor settings, there's usually a "show whitespace characters" checkbox. Next to that, I would see either 1- a text input, where the user enters the character they want to see for the configurable visible whitespaces (right now, there are 4 of them I can think of : tab, space, CR, LF) or 2-  a combo box in which some predefined characters are proposed.

How these alternatives display characters are used is pretty straightforward, just like the other predefined characters we have now: find a space/tab/etc. in the text, output the user-chosen character instead of the one that's currently hardcoded. If no alternative display character is defined, the space/tab/etc. in the text still has an effect but no rendering (i.e. a tab will still insert a tabulation and push the text on the next tabulation stop but nothing would appear on the screen).

0

Hi Amenel,

Thanks for explanation, your idea is clear but the problem with tabulation symbol representation is that it doesn't use any symbol as a representation sign at the moment. I.e. tabulation is shown as an arrowhead that occupies target number of visual column and that is implemented by direct drawing in terms of java2d api. That is the reason why I don't see convenient way to allow user to customize tabulation representation at the moment.

I see the point about application customization and agree that it may be rather important for some IJ users. From the other side, great number of application options really misguides users and makes it hard to find the one that is really necessary now.

Denis

0

Got it. I'll see how I succeed in adapting to the current state of things.
Thanks!

0

Hi Amenel,

I had the same problem, I haven't changed how tab symbol looks, but I did reduce it's visibility by changing its color to very white-like. Single space dots are hard to see now, but at least tabulations are less eye-bleeding now.

File -> Settings -> Editor -> Color & Fonts -> General -> Whitespaces -> Foreground: #F3F3F3 (my bg is #FFFFFF) -> OK.

0

Thank you Vyacheslav Kravchuk!

That was an effective solution!

0

Sorry for necro'ing an old thread but I'm having this issue right now.  The whitespace character for tabs are very visually obtrusive, and the whitespace character for spaces look too much like periods.

I am using PhpStorm.  I realize this thread is for IntelliJ IDEA but I think it's all the same IDE?

Any way we can get this to look more like how visual studio displays whitespaces?  Theirs are cleaner looking.

Basically you would remove the horziontal lines for tabs, align the arrow to the left side of the tab instead of the right side, and align the whitespace character so it's centered vertically.  Maybe give users an option to toggle how it's displayed - radio button "Style A"  and "Style B" with default Style A being how it is currently so people who like the way its displayed currently don't see a change.

This is how MSVC looks with whitespaces:

 

0

Please sign in to leave a comment.