Re: Adapting modes for folding
- Thanks for the confirmation. It looks like I will need to define some states for a couple of modes, so I'm sure I'll be following up soon with some questions along those lines.
I've already noticed a bit of the modal dark arts in the Python mode. Very intriguing!
--- In SubEthaEdit@yahoogroups.com, Martin Pittenauer <map@...> wrote:
> On 11.08.2009, at 20:29, michael_j_barber wrote:
> > There are a couple of modes I use that haven't been updated. By
> > looking through the example in the mode SDK, it seems pretty
> > straightforward: just add foldable="yes" to appropriate states
> > defined in SyntaxDefinition.xml for the mode. The hardest part,
> > then, would be adding relevant states for modes that lack them.
> That's the basic idea.
> > Is that really all there is to it? Any other tips to know or
> > pitfalls to beware of?
> As always I'd advice to have a look at the modes we ship for the
> "state of the art" in terms of black voodoo mode creation. ;)
> C.mode is pretty straight forward, XML.mode is a bit more advanced,
> PHP-HTML.mode or ERB.mode are pretty complicated.
> I put some advanced features in the engine for fine-tuning and edge
> cases, that we haven't yet documented, mainly because I want the dust
> to settle a bit before we commit to "public API". So there is some
> "headroom" should you run into a wall. In any case, let me know if
> have trouble, I'm here to help and to learn how to make this stuff
> more approachable for people not sitting in this office. ;)
> All the best,