Re: BBEdit/Textwrangler LCM for livescript

2023-03-15 Thread Ben Rubinstein via use-livecode

The links below, alas, are no longer live (well it has been seven+ years).

Are these CLMs or later versions available anywhere?

Many thanks,

Ben


On 10/09/2015 15:35, jameshale wrote:

Updated livecodeBuilder CLM to adjust function regex so that function names
appear in BBEdit's function popup

https://dl.dropboxusercontent.com/u/8212901/LiveCodeBuilder.plist
<https://dl.dropboxusercontent.com/u/8212901/LiveCodeBuilder.plist>

James



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/BBEdit-Textwrangler-LCM-for-livescript-tp4696091p4696217.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-10 Thread Kay C Lan
Thanks James, excellent work.

On Thu, Sep 10, 2015 at 10:35 PM, jameshale  wrote:

> Updated livecodeBuilder CLM to adjust function regex so that function names
> appear in BBEdit's function popup
>
> https://dl.dropboxusercontent.com/u/8212901/LiveCodeBuilder.plist
> <https://dl.dropboxusercontent.com/u/8212901/LiveCodeBuilder.plist>
>
> James
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/BBEdit-Textwrangler-LCM-for-livescript-tp4696091p4696217.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-10 Thread jameshale
Updated livecodeBuilder CLM to adjust function regex so that function names
appear in BBEdit's function popup

https://dl.dropboxusercontent.com/u/8212901/LiveCodeBuilder.plist
<https://dl.dropboxusercontent.com/u/8212901/LiveCodeBuilder.plist> 

James



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/BBEdit-Textwrangler-LCM-for-livescript-tp4696091p4696217.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-09 Thread Peter Haworth
Hi Thierry,
I did as you suggested but not seeing any difference with code folding,
still just commands and functions are foldable.

On Wed, Sep 9, 2015 at 9:04 AM James Hale  wrote:

> Thierry wrote:
> >
> > Replace the key 'Function Pattern' with the one below
> > and you might have a surprise with code folding..
>
> Well I did and it works in BBEdit. Not sure what the surprise is though,
> unless you have something in mind with the two unused named patterns.
>
> I also used it in a modified LiveCode Builder CLM and it works a treat
> there (I couldn't get my mod to work correctly)
>
>
> Function Pattern
> 
>
> So thank you very much!
>
> I have now updated the livescript CLM with Thierry's mod and a fix for
> controls not appearing in the text color prefs.
>
> I have also added my modified LiveCode Builder CLM which includes many
> more keywords (thanks Ali) broken into their "Types" as specified in the
> docs.
> As with the livescript version due to the need to break keywords into
> single word entities some of my choices in eliminating duplicates may not
> be truly correct, but its a minor glitch.
>
> The files can be obtained...
>
> https://dl.dropboxusercontent.com/u/8212901/LiveCodeBuilder.plist <
> https://dl.dropboxusercontent.com/u/8212901/LiveCodeBuilder.plist>
>
> https://dl.dropboxusercontent.com/u/8212901/Livescript.plist <
> https://dl.dropboxusercontent.com/u/8212901/Livescript.plist>
>
>
>
> James
>
> (looking forward to Thierry's next post)
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-09 Thread James Hale
Thierry wrote:
> 
> Replace the key 'Function Pattern' with the one below
> and you might have a surprise with code folding..

Well I did and it works in BBEdit. Not sure what the surprise is though, unless 
you have something in mind with the two unused named patterns.

I also used it in a modified LiveCode Builder CLM and it works a treat there (I 
couldn't get my mod to work correctly)


Function Pattern


So thank you very much!

I have now updated the livescript CLM with Thierry's mod and a fix for controls 
not appearing in the text color prefs.

I have also added my modified LiveCode Builder CLM which includes many more 
keywords (thanks Ali) broken into their "Types" as specified in the docs.
As with the livescript version due to the need to break keywords into single 
word entities some of my choices in eliminating duplicates may not be truly 
correct, but its a minor glitch.

The files can be obtained...

https://dl.dropboxusercontent.com/u/8212901/LiveCodeBuilder.plist 


https://dl.dropboxusercontent.com/u/8212901/Livescript.plist 




James

(looking forward to Thierry's next post)



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-09 Thread Thierry Douez
Hi,

Replace the key 'Function Pattern' with the one below
and you might have a surprise with code folding..

Function Pattern



Tested successfully but very quickly with TextWrangler 4.5.12 ( the latest)

I have another option, but let comments arise before going further..

Regards,

Thierry


Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-08 Thread Peter Haworth
Thanks James.  Probably not worth spending any more time on it unless you
want the code folding yourself.  I've been checking out TextMate too and it
does include code folding and is free.

On Tue, Sep 8, 2015 at 4:49 PM James Hale  wrote:

> Hi Peter,
>
> That is a shame. I guess it makes sense though.
>
> Code folding is possible if I use the SBK and make a compiled language
> module.
> I will have a look but make no promises.
>
> As far as shifting to BBEdit from TextWrangler, well it really depends on
> if you would use it for other things as well and really wanted the features
> it offered over TextWrangler.
>
> I have been using BBEdit since day one but if I am honest could probably
> drop it and use TextWrangler.
>
> James
>
> > 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.
>
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-08 Thread James Hale
Hi Peter,

That is a shame. I guess it makes sense though.

Code folding is possible if I use the SBK and make a compiled language module. 
I will have a look but make no promises.

As far as shifting to BBEdit from TextWrangler, well it really depends on if 
you would use it for other things as well and really wanted the features it 
offered over TextWrangler.

I have been using BBEdit since day one but if I am honest could probably drop 
it and use TextWrangler.

James

> 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.




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-08 Thread Peter Haworth
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  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:
> >
> >   com.barebones.bblm.livescript.commands
> >   rgb(110, 50, 200)
> >
> > would become:
> >
> >   com.barebones.bblm.livescript.commands
> >   rgba(0.43, 0.19, 0.78, 1.0)
>
>
>
> 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
>
> ja...@thehales.id.au
>
> Tel: +61 3 9386 2516
> Fax: +61 3 9386 1387
>
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-07 Thread James Hale
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:
> 
>   com.barebones.bblm.livescript.commands
>   rgb(110, 50, 200)
> 
> would become:
> 
>   com.barebones.bblm.livescript.commands
>   rgba(0.43, 0.19, 0.78, 1.0)



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

ja...@thehales.id.au

Tel: +61 3 9386 2516
Fax: +61 3 9386 1387




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-07 Thread Kay C Lan
On Mon, Sep 7, 2015 at 3:28 PM, jameshale  wrote:

> There does seem to be a way around this as mentioned in the update to
> language modules doc (for BBEDIT 11+) but I am not clear as to the syntax.
>

Yes, also struggling to make head nor tail.


> BBEdit chokes on (mainly the operators
> like * < > >= & && etc)
>
> Again, refering to Brahmanathaswani work he uses CDATA:

https://github.com/Brahmanathaswami/LiveCode-BBEdit-Language-Module















And the works fine here.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-07 Thread jameshale
Thanks Peter and Kan,

Multi word keywords:
There does seem to be a way around this as mentioned in the update to
language modules doc (for BBEDIT 11+) but I am not clear as to the syntax.
As a work around (aren't they all!) I have split all multi word keywords
into their components removing those BBEdit chokes on (mainly the operators
like * < > >= & && etc)

Colorizing within quoted strings:
Put the modified string recognition pattern back.
Initially I was jumping back between xCode and BBedit to check the sysntax
and make changes. Unfortunately this introduces a few problems of its own. I
am now using the "plutil" to check that the XML is ok for a plist and the
console to ensure BBedit can read it.

More colours:
The updated docs mention the ability to group keywords into sets and then
apply a different color to each named set. I haven't been able to get this
to work. Even though I am using the latest BBEdit the console is telling me
that it cannot find any keywords if I use the new feature. I might be forced
to write to there support.

I have updated the livescript.plist file.

James



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/BBEdit-Textwrangler-LCM-for-livescript-tp4696091p4696101.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-06 Thread Kay C Lan
On Mon, Sep 7, 2015 at 3:18 AM, Peter Haworth  wrote:

>  it appears that it doesn't recognize
> multiple words in a keyword definition.
>

I note this with Brahmanathaswami's module:



 keywords within quote-delimited strings are
>
colorized but shouldn't be.  I tried using the Open Strings 1 and Close
> Strings 1 set to quote but that had no effect.
>
> Any ideas?
>
> In James module the string pattern is:

String Pattern


In Ali's and Trevors it's:

String Pattern


I think the use of CDATA means you don't use "e;

When I change James' to Ali's and Trevor's it treats strings correctly.

HTH
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BBEdit/Textwrangler LCM for livescript

2015-09-06 Thread Peter Haworth
Thanks for this James.

I'm new to using TextWrangler but it appears that it doesn't recognize
multiple words in a keyword definition.  For example "open file" isn't
colored as a keyword, only "file" because it has a separate keyword
definition.  Not sure if there is a way round this other than breaking the
multiple word keywords into separate keyword definitions.

I would also like to learn how to define if/end if, repeat/end repeat, etc
as structures that can be folded.  I tried using the Open Statement Blocks
and Close Statement Blocks keys in the plist to define "if" and "end" as a
statement block but they weren't recognized as foldable.

There are a number of other things that don't seem to be working as far as
colorization.  Strings enclosed in quotes and variables aren't colored per
the Preferences settings, and keywords within quote-delimited strings are
colorized but shouldn't be.  I tried using the Open Strings 1 and Close
Strings 1 set to quote but that had no effect.

Any ideas?

On Sun, Sep 6, 2015 at 7:36 AM James Hale  wrote:

> Hi,
>
> I have modified Trevor's BBedit language module for livescript to bring it
> up to date with the current docs.
> (At least within the limitations of the language modules themselves.)
>
> It is now a Codeless Language Module and should work with the current
> version of these editors.
>
> I have tried it for BBedit and am assuming it will work for TextWrangler
>
> You can get it here
>
> https://dl.dropboxusercontent.com/u/8212901/Livescript.plist <
> https://dl.dropboxusercontent.com/u/8212901/Livescript.plist>
>
> Please note I haven't added the newer features available in BBEdit V11 as
> apart from working them out it would take a bit more extensive editing of
> all the keywords. If I give it a go I will post the update.
>
> Enjoy
>
> James
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


BBEdit/Textwrangler LCM for livescript

2015-09-06 Thread James Hale
Hi,

I have modified Trevor's BBedit language module for livescript to bring it up 
to date with the current docs.
(At least within the limitations of the language modules themselves.)

It is now a Codeless Language Module and should work with the current version 
of these editors.

I have tried it for BBedit and am assuming it will work for TextWrangler

You can get it here

https://dl.dropboxusercontent.com/u/8212901/Livescript.plist 


Please note I haven't added the newer features available in BBEdit V11 as apart 
from working them out it would take a bit more extensive editing of all the 
keywords. If I give it a go I will post the update.

Enjoy

James


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode