Author Topic: Is syntax coloring modifiable?  (Read 5766 times)

bostonantifan

  • Guest
Is syntax coloring modifiable?
« on: April 20, 2009, 02:13:05 am »
I'm new to codeblocks, but so far I love it, with one exception.  The syntax colors aren't to my liking.  I'd like to be able to change them but I haven't been able to find an option to change them.  Does anyone know if changing the colors is possible, and if so, can you explain how I can do it?
Thanks

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Is syntax coloring modifiable?
« Reply #1 on: April 20, 2009, 05:51:13 am »
"Settings -> Editor... -> Syntax highlighting"

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Is syntax coloring modifiable?
« Reply #2 on: April 20, 2009, 08:28:53 am »
@jens

If I want to manually change or add some keywords. How can I do that?
It seems after I press the "keywords" button. I dialog pops up.

But what does the "Set" editor control with spin bar do? (see the screen shot)

Thanks.



[attachment deleted by admin]
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

mariocup

  • Guest
Re: Is syntax coloring modifiable?
« Reply #3 on: April 20, 2009, 08:50:19 am »
Hi,

the wiki page contains some information about the lexer and the index /sets information.
http://wiki.codeblocks.org/index.php?title=Creating_a_custom_lexer_for_Code::Blocks_editor

Code
This tells us which indices are valid and what each one represents:

Index 0, "Primary keywords and identifiers"
Index 1, "Secondary keywords and identifiers"
Index 2, "Documentation comment keywords"
(notice that index "3" is not used)
Index 4, "Global classes and typedefs"

In the menu Settings->Editor->Code completion you can specify the additional key word sets to be included!

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Is syntax coloring modifiable?
« Reply #4 on: April 20, 2009, 09:42:01 am »
Hi,

the wiki page contains some information about the lexer and the index /sets information.
http://wiki.codeblocks.org/index.php?title=Creating_a_custom_lexer_for_Code::Blocks_editor

Code
This tells us which indices are valid and what each one represents:

Index 0, "Primary keywords and identifiers"
Index 1, "Secondary keywords and identifiers"
Index 2, "Documentation comment keywords"
(notice that index "3" is not used)
Index 4, "Global classes and typedefs"

In the menu Settings->Editor->Code completion you can specify the additional key word sets to be included!

Thank you!
I appreciate your help!
I will try it.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ABTOMAT

  • Single posting newcomer
  • *
  • Posts: 3
Re: Is syntax coloring modifiable?
« Reply #5 on: September 19, 2009, 04:31:50 pm »
Hello comrades, sorry for necropost.
Would you tell me how to copy my changed syntax highlighting from one computer to other one? Where does C::B keep these files?
Searched in Application Data, in C::B's folder, in help and in this forum - no answer :(
Thanks for Help,
                           Avtomat.

Added: found it! That was here:
C:\Documents and Settings\<Profile_Name>\Application Data\codeblocks\default.conf
Thx for reading.
« Last Edit: September 19, 2009, 04:34:07 pm by ABTOMAT »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Is syntax coloring modifiable?
« Reply #6 on: September 19, 2009, 04:39:54 pm »
To import/export parts of default.conf you can/should use cb_share_config.
The exe should be in C::B's executable directory.