LiveCode lexer for SynWrite/CudaText

Want to talk about something that isn't covered by another category?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Alextp
Posts: 4
Joined: Fri Jan 06, 2017 5:38 pm

LiveCode lexer for SynWrite/CudaText

Post by Alextp » Fri Jan 06, 2017 5:43 pm

SynWrite/CudaText editor now has lexer for LiveCode,
it supports most keywords hilites (4 colors of them: keywords, funcs, const, operators).
code folding for if/repeat/switch/try + code blocks (on/command/etc).

How to install in CudaText:

- CudaText needs OS's python.
== For MacOS: install any latest 3.x Python from www_python_org (Cudatext must find it in default folder)
== For Linux: Python already installed, only correct option "pylib__linux" in user.json.
== For Windows: Python shipped with Cudatext
- Plugins menu will be enabled
- call Plugins/ AddonManager/ Install
- in this add-ons dialog, find item "lexer: LiveCode"
- install it

Open any file .livecodescript. Cudatext activates LiveCode lexer on it. Statusbar click can change lexer to LiveCode (if need).

Looks like this
Attachments
livec.png
Last edited by Alextp on Sat Jan 07, 2017 11:34 am, edited 6 times in total.

Klaus
Posts: 9617
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: LiveCode lexer for SynWrite/CudaText

Post by Klaus » Fri Jan 06, 2017 6:12 pm

Hi Alextp,

1. welcome to the forum! :D

2. For all other Livecoders:
SynWrite is obviously a Windows-only codeeditor, see this website:
http://www.uvviewsoft.com/synwrite/
Cudatext is available for Win, Mac and Linux
http://www.uvviewsoft.com/cudatext/


Best

Klaus

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1969
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: LiveCode lexer for SynWrite/CudaText

Post by richmond62 » Fri Jan 06, 2017 6:40 pm

So I downloaded CudaText for Macintosh,
and downloaded the ZIP file with all the add-ons (none which seemed to be for Livecode:
use AddonManager as usual
Well, for those of us who have never seen CudaText before that "as usual" is
a bit silly, especially as the Plugins/Addon Manager menu appears to be greyed out.

Alextp
Posts: 4
Joined: Fri Jan 06, 2017 5:38 pm

Re: LiveCode lexer for SynWrite/CudaText

Post by Alextp » Sat Jan 07, 2017 11:26 am

Ok, here's details, how to install in CudaText:
- CudaText needs OS's python.
== For MacOS: install any latest 3.x Python from www_python_org (Cudatext must find it in default folder)
== For Linux: Python already installed, only correct option "pylib__linux" in user.json.
== For Windows: Python shipped with Cudatext
- Plugins menu will be enabled
- call Plugins/ AddonManager/ Install
- in this add-ons dialog, find item "lexer: LiveCode"
- install it
Now open any file .livecodescript. Cudatext activates LiveCode lexer on it. Statusbar click can change lexer to LiveCode (if need)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1969
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: LiveCode lexer for SynWrite/CudaText

Post by richmond62 » Sat Jan 07, 2017 12:32 pm

Thank you for putting me right as to Python.
Now open any file .livecodescript
I must be missing something entirely; I cannot find any sort of .livecodescript file
on my machine to save my life; only .livecode files which CudaText open in a
completely unreadable format.

Alextp
Posts: 4
Joined: Fri Jan 06, 2017 5:38 pm

Re: LiveCode lexer for SynWrite/CudaText

Post by Alextp » Sat Jan 07, 2017 1:12 pm

Hm, interesting... I see syntax for SublimeText3. It has file extent "livecodescript". Only. Which file extensions should lexer have?
github _ com /trevordevore/livecode-sublimetext/blob/master/LiveCode.sublime-syntax

Klaus
Posts: 9617
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: LiveCode lexer for SynWrite/CudaText

Post by Klaus » Sat Jan 07, 2017 1:27 pm

Only because Richmond does not have a .livecodescript file on his machine
does not mean that this is the wrong file extension for lexer! 8)

@Richmond
Come on, we are obviously talking about TEXT editors here and .livecode files are binary stuff!
So what did you exspect?

Maybe this is something you just don't need? :D

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1969
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: LiveCode lexer for SynWrite/CudaText

Post by richmond62 » Sat Jan 07, 2017 2:37 pm

Come on
Yes; the whole thing seemed a bit odd . . .
Maybe this is something you just don't need?
No: I don't, but people don't have to climb Mount Everest either.

I have only rarely used anything other than the LiveCode built-in scriptEditor: I copy-pasted very long scripts into
Mac PPC's "AppleWorks" at one time as I found that it's search-and-replace worked rather better at the time (LiveCode/Revolution 2.0).

So, @Klaus, Please "put me out of my misery" and explain how, for the sake of argument,
I might go about working with a .livecodescript document.

Klaus
Posts: 9617
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: LiveCode lexer for SynWrite/CudaText

Post by Klaus » Sat Jan 07, 2017 2:55 pm

Hi Richmond,

I, too, do not have the need for any external script editor.
Please "put me out of my misery"
Since version 8 (?) we can have SCRIPT only stacks, which are in fact simple text files with the extension .livecodescript.
Check the content of folder "Tools/Toolset/..." in your Liveocde folder, there you will find MANY examples of this new kind of stack/script file.


Best

Klaus

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1969
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: LiveCode lexer for SynWrite/CudaText

Post by richmond62 » Sat Jan 07, 2017 3:09 pm

Since version 8
You know me: stuck in a Retro time-machine :P

Tools/Toolset/libraries . . . Oh, Yes :/
CudaTest.png

Alextp
Posts: 4
Joined: Fri Jan 06, 2017 5:38 pm

Re: LiveCode lexer for SynWrite/CudaText

Post by Alextp » Sat Jan 07, 2017 6:24 pm

@Richmond
text not hilited, reason: lexer not installed? Click on statusbar "(none)", lexer list shows, no LiveCode in list?

Post Reply

Return to “Off-Topic”