May be a stupid question... But, is it possible to add new syntax coloring in µVision ? I saw that Keil give six different colors for background, keywords, string, .... So, is it possible to create a new type of coloring syntax ? I saw that some .INI files in the µVision directory contain all keywords! Is there a place like this file to create a new syntax coloring ? Why I would like to do that ? Because, I would like that C keywords and 8051 SFR's appears with 2 differents colors when i'm coding in C.
"I would like that C keywords and 8051 SFR's appears with 2 differents colors when i'm coding in C." Yes, that'd be good. I suggested this to Keil a while back, but no answer yet... I think you can just add keywords to the C51.INI file; eg, I think I once added defined, as uVision doesn't automatically highlight it! I think I just added
defined=C
Me too i try some change in the C51.INI file, but nothing change in µVision. I search the register base, and find many keys who define the syntax coloring. I try to add some but, I don't know if Keil accept some new syntax.
Well, uVision v2.23 still doesn't highlight the defined ANSI 'C' keyword as standard; so I've just added it again. The procedure is: 1. Open C51.INI in Notepad 2. Add a line "defined=C" in the [Keywords] Section (I don't know if it must be in alphabetical order, but I did anyway). 3. Save & Close C51.INI Next time you start uVision, defined will be coloured just like all the other 'C' keywords. At the top of the C51.INI, we see:
[Colors] C=0,0,255 CXX=128,0,128 CPP=0,0,128
Yes! I already did this test ! And I've got no difference! In a first step, I try to change the value C=0,0,255 (me too i thought about RVB code) in value: C=255,0,0. But this gives also no changes. In a second step, i search the register base (with the word KEIL and found this: some keys defined the syntax coloring, there is a key: "keywords" who contain the string "c51.ini" and another key: "keyword" who contain "0,0,255". I try to change some value, like "0,0,255" in "255,0,0". And Keil change my blue settings in a red settings ! So I found the place where Keil save his parameters. But my next tries doesn't gives me some new success in my quest of the syntax coloring ! I try to had some new keys, but without any success. May be Keil now if µVision accept some correction somewhere to had some new syntax coloring ?