Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B

SmartHighlight

(1/2) > >>

Flippeh:
First on, sorry if this is the wrong section - i couldn't find any better. Feel free to move if its wrong  :)

So on to my suggestion.

Imagine the following...

--- Code: ---class MyClass
{
   // ...
}

int main()
{
   MyClass something;
   // ...
}

--- End code ---

Wouldn't it be great, if the "MyClass" in front of the "something" gets highlighted like "int", "char" or "double" or any other default data type would? Its really 'boring', to see it in the default black color..

IDEs like Visual Studio do this already.

Would it be possible to add this any time?

XayC:
While, of course, possible, I don't think you can expect it being implemented soon. First because Code Completion still has more important things to fix/implement (including a complete redesign), and second because, from what I know, color highlights are done by the text editor (Scintilla) automatically on a predefined set of language keywords, so it would require changes both in the editor code and in the code completion.

Regards, XayC

orel:

--- Quote from: Flippeh on October 01, 2007, 08:58:29 pm ---IDEs like Visual Studio do this already.

--- End quote ---

I develop every day at work with VS 2005, and haven't seen such feature (maybe are you speaking about 2008 ?), the only way to have some new keywords highlighted in the editor is to define them 'by hand'.

And i find the way to define new keywords much user-friendly in CB than VS. In CB you just have to go to Settings/Editor/Syntax Highlighting/.
I VS you have to create a file named 'UserType.dat', populate it with your keywords set and place this file in one of VS installation dirs.

AngleWyrm:
You can get this effect by defining "user keywords".

Settings->Editor->Syntax Hilighting.
Click the "Keywords..." button, and then scroll the "set" to #2.

Here, there will be a blank area in which to define any user keywords. If these words are then encountered in the code (not in comments), then they will be highlighted using whatever color choices were made for "user keywords".

fchen:

--- Quote from: Flippeh on October 01, 2007, 08:58:29 pm ---IDEs like Visual Studio do this already.

--- End quote ---

I think he mean a plug-in for Visual Studio called "Visual Assistant". It has many cool features. I think Code::Blocks should learn from it.

Navigation

[0] Message Index

[#] Next page

Go to full version