dan.sg wrote:
I'm writing an editor on top of scintilla (not enough of that done IMO :),
and I'd like specified styles to stay consistent across languages.

For example, if I specify that keywords should be blue and bold, I'd like
that to be true for all supported languages (where it makes sense). I can't
find an easy way to do this, since different id's mean different things in
different lexers (brief excerpt below).

Is there something I'm missing?

Just look at the way, say, SciTE does it - you effectively add a level of indirection.

This means that for each language-specific .properties file (to follow SciTE's conventions), you just map specific styles in that lexer to values like, e.g., "$(font.base)" or "$(colour.operator)".

That way, in a global .properties file, you can define all the common values for font face, weight, color, etc. to values that all your supported can share (when it makes sense).

You can take a look at the global definitions in SciTEGlobal.properties and see how those are used by some of the individual lexer .properties files.

Robert Roessler
[EMAIL PROTECTED]
http://www.rftp.com
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to