Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse CDT variable colors in editor

I hope this is an OK question to ask here. It's programming related so I thought it would be better here than superuser. So I'm using the CDT C++ eclipse plugin. I know how to change the colors the editor uses for certain things. But is there a way to make it so all variables are DIFFERENT colors? For example in KDevelop, it sets local variables and class variables different colors and bolds class variables. Can I replicate that in CDT?

like image 981
Falmarri Avatar asked Aug 04 '10 17:08

Falmarri


1 Answers

The Eclipse text editor offers some level of color customizations for syntax.

You can check it on: Window > Preferences > C/C++ > Editor > Syntax Coloring

There are several elements that can be changed, including Code, Assembly, Comments, Preprocessor and Doxygen.

Under Code, its possible to change the color of certain variable types, like global variables, local variable declarations, local variable references, and parameter variables.

But I don't think its able to change the color of every single variable you declared in the code. Maybe you can search for an Eclipse plugin to do that.

like image 160
karlphillip Avatar answered Oct 12 '22 00:10

karlphillip