0

I have a couple structs typedef'd in my code, and I am using them frequently throughout my code. To improve readability, I would like my struct type to have its own text color, just like an int or char would. Is there a way to do this in gedit?

for example:

typedef struct  
    {
        int m;
        float v;
        float x;
        float y;
        float z;
    } body;

int n;
body x;

"int" will be colored blue in my theme, but "body" has the same color as a variable name. this is making my code increasingly difficult to read.

thanks for any input!

Chris Phillips
  • 1,997
  • 2
  • 19
  • 34

1 Answers1

1

This is what you're looking for:

Creating your own syntax highlighting in GEdit?

You just have to add a keyword that is the name of your struct.

I personally would try using a proper IDE instead of a text editor like gedit though.

Community
  • 1
  • 1
GriffinG
  • 662
  • 4
  • 13