Eclipse: Make Tabs visible, Spaces invisible
Asked Answered
B

1

8

Usually I'd like to edit files with Spaces only.

But when I open files with Tabs, I'd like to see them (for example as arrows ->). With such files I do my edits careful, so not to destroy the original authors coding style -- usually I insert tabs by hand when needed.

So, I want to see Tabs all the time, but using the General, Editors, Text Editors, Show Whitespace Characters option, I get distracted by all the whitespace-dots.

How can I reduce this distraction by Spaces, but at the same time see the Tabs?

  • Can I change the font color for the visualized whitespaces to a brighter color? currently they are medium gray, but I can not find an option to change that.
  • Or can I choose different setting for Tabs and for Spaces (and Paragraph signs, for that matter)?
  • The way I used to have it in my goo' ol' editor would be: Change the background color of Tab to light-yellow (without display the -> for tabs or the dots for Spaces). This makes Tabs wuite visible, without harming my "normal" source visualization. This would be my favorite. I did that by adding the Tab to be a keyword in all languages, and then change the keyword background color to a bright yellow.
Burin answered 18/11, 2010 at 12:24 Comment(2)
My opinion it is not a problem. Use formatters for your project, and set the formatter as save action. Everybody should use them, then it can be a standard in your company.Crosscheck
Alas, I have a lot of legacy code to maintain. Also from customers, which might have their own coding rules, which I can only guess when I see the Tabs. And, it would be unwise to reformat all code just because I changed 3 lines. That would "break" the diff algo of many SCMs, end would make the job of the customers peer reviewer more difficult. Also, the Formatter in Java might be a good Idea, but I also develop in C++, Scala and so on. Alas, those formatters are not as good as the Java one. Therefore I disagree: It "is a problem".Burin
M
5

According to the Eclipse 3.7M3 New and noteworthy you can customize the Show Whitespace Characters to show only tabs but not spaces.

Unfortunately the stable version of Eclipse 3.7 is expected in 2011 summer but if that feature is a 'must' for you you can try that milestone.

Micronesia answered 18/11, 2010 at 18:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.