Sublime Forum

ST2 visual theme editor and more

#10

Well, the VIPShell is just an example of one of the many tools that now work right out of the box with ST2. Of course, most of those tools aren’t “ST2 aware” since they were created before I had even heard of ST2. I picked the VIPShell tool as an example because, by its very nature, it could work directly with the ST2 Python API without any changes or extensions.

The VIPShell is part of the Facets package, which is what I used to implement the ST2 theme editor. Briefly, Facets is a Python package for model-driven “reactive” programming. I’ll leave it at that for now, but if there is enough interest, I can provide more details.

Facets (see above). Assuming I understand what you mean by “graphics toolkit”, here is the Facets code that creates the main display of the theme editor shown in the screen shots:

View(
    VGroup(
        HGroup(
            UItem( 'theme',
                   editor  = EnumEditor( name = 'themes' ),
                   springy = True
            ),
            '_',
            UItem( 'add_theme',
                   tooltip = 'Edit a new copy of this theme'
            )
        ),
        UItem( 'theme_file_name',
               editor = TextMateThemeEditor(
                              interval = 500,
                              modified = SyncValue( self, 'modified' ) )
        ),
    ),
    title  = 'Sublime Text 2 Theme Editor',
    id     = 'sublime_facets.st2_theme_editor',
    width  = 0.4,
    height = 0.3
)

Like I said in my first post, to me the really cool thing is that the entire Facets package works with ST2. The theme editor is just one quick example of the kind of tool that can be built for ST2 using Facets. I’m certainly going to leverage it in my own work, but at this point I’m also curious to see if there is enough ST2 community interest to make it worthwhile looking into packaging and documenting it for use by others…

0 Likes

#11

I really would love to hear more about this.

Seems pretty cool, thanks for the facets tip, gotta read more about it.

Thanks !

0 Likes

#12

Well, Facets should certainly fit the bill for that, and that’s the ways its used most often. This is my second experience using Facets as an embedded framework. The first was with the NewTek LightWave ‘Core’ application (a 3D graphics package ala Maya, modo, …). The Facets embedding looked very promising, but unfortunately NewTek ended up terminating developing of the Core project.

Traits is the name of the first version of the package I wrote. Facets is its much improved second generation younger sibling. I’m trying to get it to an “alpha” release now. After 9 years of development it’s pretty stable, but since there are still a couple of subsystems that need major overhauls before it reaches a 1.0 level, I’m only ready to classify it as an “alpha”, since I’m reserving the right to redo some APIs in a non-backward compatible manner.

Well, if you’re willing to get involved with “alpha” level code, I’ll put you on the list…

0 Likes

#13

At this point there is no official “alpha” release, so the “list” is virtual. I’m not ready to throw open the doors to the general public, because of the future potential for API breakage, but if anyone really, really wants to get their hands dirty now, they’re welcome to, provided they can live with the possibility of having to make changes to their code in the future for the 1.0 release. BTW, these won’t be changes every couple of days. They’re likely to be just a couple of big changes that happen somewhere along the road to 1.0 that will come with plenty of warning. And unless you’ve already got 100,000 LOC written, even those won’t be that big a deal. So PM’ing me is fine for now if you want to get early access to the code.

No, that was part of the Eureka moment. After coming up with lots of weird schemes that might or might not work very well, I finally decided to try using the normal Facets API. And guess what…it worked! So the secret is that there isn’t anything special you have to do to make it work (other than making sure that all the right external libraries and packages end up being in the ST2 sys.path.

I could speculate as to why it just works out of the box, but since the creator of ST2 doesn’t seem to provide much detail about how ST2 is written, I won’t either :smile:

0 Likes

#14

Yes, although its been totally re-architected in Facets.

Qt (that’s a big hint there :smile: )

Yup, got it. Already e-mailed you a reply…

0 Likes

#15

…!

I just thought I’d mention we might be slightly interested if we’re not too busy.

YES YES YES YES YES YES

0 Likes

#16

I am very interested in the facets library, please count me in as an alpha user :smile:

0 Likes

#17

can’t wait for the first public release…nid something to tweak the syntax highlighting

0 Likes

#18

Have there been any updates on this? Seems like a great tool.

If not, are there any similar applications?

0 Likes

#19

I would love this!

0 Likes

#20

As a representative of the non-coding users of ST2, I’d like to say that this would be very useful for us as well.

Thanks,
Kensai

0 Likes

#21

Is this a THEME editor or a SCHEME editor?

0 Likes

#22

if you wanna get all technical … it’s a scheme editor yes …

0 Likes

#23

Thanks. Would be cool! Currently I use Textmate’s preference dialog as a scheme editor.

0 Likes

#24

@dmorrill: Is is possible to get a copy of Facets? I am a python developer and it would really interest me. I tried PMing but the messages are still in my outbox.

Regards,

Nikos Tzanos

0 Likes

#25

dmorrill.com/facets/users_guide/

Hope he doesn’t slay me for linking it

0 Likes

#26

Thanks a lot. I hope he doesn’t :smile:

By the way why do my PM stay in the Outbox? Am I doing something wrong?

0 Likes

#27

This looks very promising and i would love to give it a try (even though its still in alpha).

Great job!

0 Likes

#28

I call shenanigans. Or vapor-ware.
When might we expect to see this visual theme editing plugin released into the wild?

0 Likes

#29

[quote=“castles_made_of_sand”]http://dmorrill.com/facets/users_guide/

Hope he doesn’t slay me for linking it[/quote]

I think you should be OK. I found it Via Google (David Morrill facets, second result).

0 Likes