User forums > Using Code::Blocks

Specific highlighting

(1/2) > >>

Phumus-9:
Hello everyone,
I recently started programming in C++ and I decided to use Codeblocks as my IDE, and the first thing I'd like to change is the highlighting, because the default one is too colorful.
I was wondering if there was a way to highlight of a specific color the fields of a class (inside that class). For example:


--- Code: ---class Rectangle {
    int width, height;
  public:
    int area() {return width*height;}
};
--- End code ---

I'd like to have every occurrence of "width" and "height" highlighted of a specific style. I searched on the forum but I found nothing, probably it's not a requested feature.


Moreover I'd like to highlight constants and the names of classes (about this last thing I found a question dated 2011, and the answer was that it was not possible, but maybe things have changed).

Last thing regarding highlighting: what is the "global classes and typedefs" option for?

Thanks in advance!

oBFusCATed:
I guess the answer is nope to this request. C::B doesn't support semantic highlight. It has a hack which sort of works on members, but it is not reliable.

BTW. You're saying that the highlighting looks colorful, but still want to have semantic highlighting which turns code into a rainbow :)

Phumus-9:

--- Quote from: oBFusCATed on February 13, 2019, 12:32:56 am ---I guess the answer is nope to this request. C::B doesn't support semantic highlight. It has a hack which sort of works on members, but it is not reliable.

BTW. You're saying that the highlighting looks colorful, but still want to have semantic highlighting which turns code into a rainbow :)

--- End quote ---

Thanks for the answer!
Well, I come from IntellijIDEA, that is why I'd like to have that type of highlighting. You are right, I like semantic highlighting, but more than a rainbow of colours it is a rainbow of styles (underlined, bold, ...). Colors are just black, dark blue and dark purple ;D. But for example I hate those red operators, and I don't know why every IDE highlights operators, but generally only in C/C++.

You talked about an hack, do you have a link where I can elaborate on this?

Moreover I noticed that the text I write in C::B is not sharp. I don't know how to explain, but it is kind of blurred. I use the default font.

oBFusCATed:

--- Quote from: Phumus-9 on February 13, 2019, 03:25:10 pm ---You talked about an hack, do you have a link where I can elaborate on this?

--- End quote ---
I think it is on by default, but is somewhere in the editor settings.


--- Quote from: Phumus-9 on February 13, 2019, 03:25:10 pm ---Moreover I noticed that the text I write in C::B is not sharp. I don't know how to explain, but it is kind of blurred. I use the default font.

--- End quote ---
OS, Monitor DPI, scaling setting, C::B version? If you're on windows you have to tell codeblocks that it is dpiaware or something similar. Or try a night build.

Phumus-9:

--- Quote from: oBFusCATed on February 13, 2019, 07:58:16 pm ---
--- Quote from: Phumus-9 on February 13, 2019, 03:25:10 pm ---Moreover I noticed that the text I write in C::B is not sharp. I don't know how to explain, but it is kind of blurred. I use the default font.

--- End quote ---
OS, Monitor DPI, scaling setting, C::B version? If you're on windows you have to tell codeblocks that it is dpiaware or something similar. Or try a night build.

--- End quote ---

Windows 10, the screen is 17' and full HD (1920x1080), scaling setting in Windows settings menu is 125%, C::B 17.12.
I right clicked on C::B icon -> Properties -> Compatibility. There I enabled "Disable full screen optimization". Then in the same menu I clicked "Modify high DPI settings" and there I enabled the first opion and selected "Use DPI values at the opening of this program". Then I applied these new settings, opened the program but nothing changed.



--- Quote from: oBFusCATed on February 13, 2019, 07:58:16 pm ---
--- Quote from: Phumus-9 on February 13, 2019, 03:25:10 pm ---You talked about an hack, do you have a link where I can elaborate on this?

--- End quote ---
I think it is on by default, but is somewhere in the editor settings.

--- End quote ---
Mhh, I snooped a bit in Settings -> Editor, but I found nothing.

Thanks again!

Navigation

[0] Message Index

[#] Next page

Go to full version