[Bf-committers] Syntax Highlighting & Alternate Languages
Sergey I. Sharybin
g.ulairi at gmail.com
Wed Jul 27 10:51:19 CEST 2011
Hi,
I'll agree that at least it should be patch which would allow to easily
define new highlighting schemes. There are several ways how this could
be done. Easiest way is defining set of keywrds. That's like current
highlighting works.
But supporting new languages not only relates on syntax highlighting.
Current editor is "optimized" for text blocks and python files. I mean
all that indentation things we've got atm. I suppose there should be
another indentation policy for GLSL shader files. And such rules also
should be configurable from language definition rules. Probably it'll
require re-implement scripts attaching to SpaceText and which could be
"triggered" on different events -- like Enter key pressed or so. Then
all per-language indentation/code style/etc could be implemented as
small handlers for such kind of events.
And i've also got ideas of attaching scintilla editor here
(http://www.scintilla.org/). It allows to define "custom" renderer which
could be opengl renderer so probably it wouldn't be so difficult to
adopt it for Blender. And if it would:
- We'll have fully configurable editor in terms of highlighting schemes,
code stylie behavior and so
- It'll be pretty simple to add new custom languages (but not via
python, it'll uses XML, iirc).
- It's more like _normal_ text editor than current text editor in
Blender. SpaceText is a very basic text editor.
--
With best regards, Sergey I. Sharybin
More information about the Bf-committers
mailing list