BBEdit/Textwrangler LCM for livescript

Peter Haworth pete at lcsql.com
Tue Sep 8 12:44:32 EDT 2015


Hi James,
Thanks for all your work on this.  Unfortunately, the grouping of keywords
doesn't seem to work in TextWrangler.  Only string literal are colored now
and there are no extra color preferences.  Not really surprising since
TextWrangler is free.

Maybe I'll have to give BBEdit a whirl, although the lack of folding is a
big minus for me.

On Mon, Sep 7, 2015 at 10:21 PM James Hale <james at thehales.id.au> wrote:

> I contacted BBEdit re getting the newer version of the CLMs working and
> had some success and some failure.
> Success: Keywords now broken up into classes with a different colour for
> each class.
> Failure: multi word keywords are not possible with the CLM
>              Control structure folding is thus not possible either (cannot
> tell "end if" from  "end repeat" as it can't handle multi word keys)
>
> I originally contacted Rich as I was getting a BBEdit console error
> stating that there were no keywords and hence color syntax would not work.
> As it turns out, the error message is bogus and the colorsyntax wasn't
> working due to another bug. I will let Rich explain.
>
> > As to the coloring generally: the module is constructed correctly, but
> the default colors aren't being loaded because of an obscure math bug that
> arose out of the need to support some legacy preferences. Fortunately, you
> can work around this permanently as follows: in each case where your
> language module specifies a color as "rgb(R, G, B)", you can rewrite this
> as a four-component RGBA color: "rgba(r, g, b, a)", where each component in
> the rgba color is computed by dividing the respective component in the RGB
> color by 256.0, and the "a" component is always 1.0. Thus:
> >
> >               <key>com.barebones.bblm.livescript.commands</key>
> >               <string>rgb(110, 50, 200)</string>
> >
> > would become:
> >
> >               <key>com.barebones.bblm.livescript.commands</key>
> >               <string>rgba(0.43, 0.19, 0.78, 1.0)</string>
>
>
>
> So I have updated the LCM to now separate the keywords into the following:
>         properties
>         operators
>         objects
>         messages
>         keywords
>         functions
>         constants
>         commands
>         controls
> and given each a different color! (Well if its there, use it :-))
>
> As a bonus, as these are named sets they appear in the "Text Colors" pane
> of the BBEdit preferences, so you can change them to your liking without
> the need to do the maths and edit the .plist (NB: for some reason the
> "controls" set does not show in the pref pane.)
>
> I have uploaded the revised livescript.plist.
> https://dl.dropboxusercontent.com/u/8212901/Livescript.plist
>
>
> James
>
> james at thehales.id.au
>
> Tel: +61 3 9386 2516
> Fax: +61 3 9386 1387
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list