User forums > Help

feature request: different colors for C-style and C++-style comments

(1/4) > >>

vix:
Some years ago I've already posted a request for some modifications to syntax coloring for C/C++ code (see http://forums.codeblocks.org/index.php/topic,5357.0.html), but I know that request was really specific and not of general interest.
Recently I noticed that CodeLite has a nice feature that I think could be useful: in a C/C++ source file you can set two different colors
one for C++-style comments

--- Code: ---// This is a C++ style comment
--- End code ---
and a different one C-style comments

--- Code: ---/*
This is a C-style comment
*/
--- End code ---
In C::B these two comments are colored in the same way.
What do ypu think about this idea?

Thanks
vix

ollydbg:
This is done in the scintilla lexer.
For example, I'm using NotePad++, which use scintilla too, I can config the comment with different color.
See the screen shot below. Note: I'm opening a *.asy file. which has a custom lexer.
So, I suggest you need to search in Scintilla and SciTE

[attachment deleted by admin]

vix:

--- Quote ---For example, I'm using NotePad++, which use scintilla too, I can config the comment with different color.
--- End quote ---
I understand that Scintilla lexer can be customized to get what I need.
The screenshot you posted shows two interesting parameters "Comment Open" and "Comment Close" that unfortunately C::B doesn't support.
I think that C::B is a really fantastic IDE (easy integration with compiler and debugger, for example), but as a pure editor is less powerful than other ones (Notepad++, for example)  :(

I tried to implement some modifications to the lexer_*.xml files into my Nightly Build installation, but nothing changes.
Should I recompile C::B from sources if I want to modify a lexer_*.xml file?

ollydbg:
sorry, I know little about the Scintilla lexer, I think you can ask on the Scintilla forum. :D.
By the way, it seems C::B can change both "C" and "c++" comment to the same color.

oBFusCATed:
vix: have you run the src/update.bat or src/update scripts?

Navigation

[0] Message Index

[#] Next page

Go to full version