Author Topic: Functions-> Snytax Highlight  (Read 5352 times)

Mati

  • Guest
Functions-> Snytax Highlight
« on: June 21, 2007, 08:19:53 pm »
Hello,

i'm new to this forum.
It is my first time i will use code::blocks and i have just a little question.
There are a few syntax highlight features in the editor settings section. But i'm missing a highlighting for functions....? Am i blind or
is this feature not supported ? Furthermore i'd like to highlight special keywords like typedefs or structs in different color - is this possible?

What is the keyword section? I could neither find any help within the forum nor in the documentation ...

Thanks a lot!

Offline lubos

  • Almost regular
  • **
  • Posts: 131
Re: Functions-> Snytax Highlight
« Reply #1 on: June 23, 2007, 07:44:15 pm »
i didnt find this also  :(

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Functions-> Snytax Highlight
« Reply #2 on: June 23, 2007, 07:54:01 pm »
Most of us don't have experience with Visual Studio, we built Codeblocks from scratch. Please explain what's that "functions highlighting", so we could add this feature at a later stage.

Also, the "keywords" tell the editor what are the reserved keywords of your language, for example, in C++ we have "for", "while", "if", etc. Codeblocks allows also to highlight your "custom" keywords. But I didn't program that feature and I don't use it, so I couldn't tell you how it works :P

If you want to highlight a particular type of variables, I'm afraid this isn't possible (yet). However, you can highlight ALL the user-defined variables in a different color. That's the "normal" color :) I set my normal color to bold blue for PHP, and the keywords to black. This way only the function names will be highlighted in blue.

The syntax highlight feature is part of the Scintilla editor component, perhaps you can find more info with them.
« Last Edit: June 23, 2007, 08:01:26 pm by rickg22 »

Mati

  • Guest
Re: Functions-> Snytax Highlight
« Reply #3 on: June 23, 2007, 08:31:08 pm »
Thanks for reply,

i try to explain function highlight: Every method/function wihtin a class should be highlighted in another color. Im working wiht linux and under kde it is possible to set different colors for most of keywords (e.g: char, double, int, ....and functions). For example:

int main( ....) 

int could be brown and main could be blue for example. Thats what i mean.

Ok - so its possible to highlight only two sets in different color  - the user keywords and the "normal" keywords.

Thanks a lot

Offline lubos

  • Almost regular
  • **
  • Posts: 131
Re: Functions-> Snytax Highlight
« Reply #4 on: June 23, 2007, 09:25:24 pm »
also the different collors for classes would be nice, like

class CMyClass;

CMyClass class1;
class1.intMember = 5;

would be nice to have class1 highlighted with own color also.  :D

Offline mspoerr

  • Single posting newcomer
  • *
  • Posts: 9
    • wktools
Re: Functions-> Snytax Highlight
« Reply #5 on: November 06, 2007, 05:48:51 pm »
Hello,

I dig out this old post, because I am looking for the same feature. I used Visual Studio with Visual Assist and there you can specify a seperate color for Variables. This means that every time I define a new variable or function, this color is used. This would be very helpful for me, because the code gets much more clear.

/mspoerr

Offline Drydive

  • Single posting newcomer
  • *
  • Posts: 7
Re: Functions-> Snytax Highlight
« Reply #6 on: October 17, 2008, 02:36:51 pm »
Hi,

I am also looking for the function highlight capability for C++ classes in CB. Has there been any progress lately
to provide an extended syntax highlight lately? I did not find this option in my nightly build version
of CB (Version from 21.September 2008, 5208).

Any  comment on this is welcome...


Offline Drydive

  • Single posting newcomer
  • *
  • Posts: 7
Re: Functions-> Snytax Highlight
« Reply #7 on: October 21, 2008, 03:46:44 pm »
Is nobody interested in this feature anymore :(?  Or is this already implemented in a plugin that I do not know?
Would be nice to get a comment on this ...