Author Topic: syntax highlighting/themes... plain text?  (Read 11001 times)

Offline nacitar

  • Multiple posting newcomer
  • *
  • Posts: 27
syntax highlighting/themes... plain text?
« on: June 17, 2009, 05:21:46 pm »
I've been customizing my syntax highlighting, making some nice light-on-dark themes.  My only problem now is that the "plain text" highlighting used when making a new empty file can't be set.  I just want to specify that it has a black background and grey text, but I cannot figure out how to make that so... stuck with black on white for plain text.


This causes another issue, too, as the color of the caret is not customizable per each syntax highlighting theme, so if i have a white cursor i wont be able to see it in plain text either.

How can I set fg/bg color for "plain text"?

EDIT: Also, how can I specify the color for keywords beyond keyword bank 2, in the syntax highlighting section?  There's "keywords" (bank 1), then there's "user keywords" (bank 2)... how about the other banks?  Or is that unfortunately not implemented (like I suspect is also the case for "plain text" foreground/background)?
« Last Edit: June 17, 2009, 08:55:48 pm by nacitar »
Jacob McIntosh - Software Developer

Offline nacitar

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: syntax highlighting/themes... plain text?
« Reply #1 on: June 17, 2009, 10:48:13 pm »
I just looked through default.conf, and I see no setting in there for any of the additional keyword banks, or for the default/no language/plain-text style (which should have a background/foreground option).

So, I'm thinking this feature is missing, unless I'm mistaken.  What's interesting too is, if I open up a c++ file that I've themed to have a black background and such, if I go to edit -> highlight mode -> plain text, it uses the background color and font color in "default" for the c++ theme I was in, it does not swap back to black on white.  If I make a new file, it's back to black on white.  This leads me to believe there simply is no option for this at all.

So, unless I'm missing something here, a few features need to be added in order to make the syntax highlighting 100% good to go.

1) Need to move the caret color option to be grouped within a particular language's syntax highlighting, because depending upon the background color of that particular language's syntax highlighting, the cursor could become invisible and the user currently has no means to combat this unless every language uses the same background color (which cannot be done at all right now, even, due to "plain text"... unless you use white backgrounds for all languages).
2) Need to add the ability to set the colors for further keyword banks beyond 1 and 2 for each language.
3) Need to add "plain text" as an actual 'language' entry for syntax highlighting (just like all the languages), and have that apply when no other language's highlighting can be.

Plain Text should have colors for:
- caret
- foreground
- background
- active line
- selection

It wouldn't need anything else.

With those changes, I believe that the syntax highlighting setup would be perfect, with the only improvement I can think of being in addition adding an easy way to save your complete "color theme" and import others.  Because once the highlighting gets to be working how it should, I'm making some nice VIM-esque black backgrounded themes.


How's that sound?  Should I submit it to the tracker?  Is anyone interested in implementing this?  Or... is everything I need to do possible already and I just don't know how to do it? =P

EDIT: I had some issues with the makefile support once on a work project I was using codeblocks for ( http://forums.codeblocks.org/index.php/topic,9941.0.html ), and I posted the details of it on the forum... one week later, some pimpin', perfect, totally revamped makefile support was in codeblocks... you guys tend to respond quickly.  Maybe it will happen again, maybe it won't.  Either way, GG codeblocks. :)
« Last Edit: June 17, 2009, 10:55:09 pm by nacitar »
Jacob McIntosh - Software Developer

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: syntax highlighting/themes... plain text?
« Reply #2 on: June 18, 2009, 09:13:09 am »
I just looked through default.conf, and I see no setting in there for any of the additional keyword banks, or for the default/no language/plain-text style (which should have a background/foreground option).
Not all settings are written to this file. Just the ones that differ from the defaults. So what you see in this file is probably not all parameters present. BTW: The config file should only be altered by C::B itself, especially not by hand. Otherwise you take the risk of serious side-effects.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline nacitar

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: syntax highlighting/themes... plain text?
« Reply #3 on: June 18, 2009, 04:21:41 pm »
I just looked through default.conf, and I see no setting in there for any of the additional keyword banks, or for the default/no language/plain-text style (which should have a background/foreground option).
Not all settings are written to this file. Just the ones that differ from the defaults. So what you see in this file is probably not all parameters present. BTW: The config file should only be altered by C::B itself, especially not by hand. Otherwise you take the risk of serious side-effects.

I was just looking at that file to see if something jumped out at me that I missed in the GUI.


"How's that sound?  Should I submit it to the tracker?  Is anyone interested in implementing this?  Or... is everything I need to do possible already and I just don't know how to do it? =P"

Advise me, please.  Hoping to push this through the proper channel so my codeblocks can look sexy, as in the attached.  It's just sooo close to being able to perfect the dark theming.





[attachment deleted by admin]
« Last Edit: June 18, 2009, 04:27:54 pm by nacitar »
Jacob McIntosh - Software Developer

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: syntax highlighting/themes... plain text?
« Reply #4 on: June 18, 2009, 04:26:34 pm »
Should I submit it to the tracker?
Yes.

Or... is everything I need to do possible already and I just don't know how to do it? =P"
I don't know to be honest. I always use the default colours which are just fine to me. I never played with these settings in my (C::B) life neither I implemented them. Probably another dev can answer more precisely.

For me this:
2) Need to add the ability to set the colors for further keyword banks beyond 1 and 2 for each language.
...is the only option I would second. The others are of no interest to me and only to me.
« Last Edit: June 19, 2009, 09:17:23 am by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline nacitar

  • Multiple posting newcomer
  • *
  • Posts: 27
Jacob McIntosh - Software Developer

nepjua

  • Guest
Re: syntax highlighting/themes... plain text?
« Reply #6 on: December 29, 2009, 09:33:52 pm »
I just looked through default.conf, and I see no setting in there for any of the additional keyword banks, or for the default/no language/plain-text style (which should have a background/foreground option).
Not all settings are written to this file. Just the ones that differ from the defaults. So what you see in this file is probably not all parameters present. BTW: The config file should only be altered by C::B itself, especially not by hand. Otherwise you take the risk of serious side-effects.

I was just looking at that file to see if something jumped out at me that I missed in the GUI.


"How's that sound?  Should I submit it to the tracker?  Is anyone interested in implementing this?  Or... is everything I need to do possible already and I just don't know how to do it? =P"

Advise me, please.  Hoping to push this through the proper channel so my codeblocks can look sexy, as in the attached.  It's just sooo close to being able to perfect the dark theming.





how can i have these colours ?