Page 2 of 3

Re: Does Livecode have a prettify option?

Posted: Sat Jul 25, 2020 12:22 am
by bwmilby
Atom can do linting on Mac/Linux. I tried to get the Windows version working, but for now I've not been able to make it lint properly. If anyone can spot the issue and help me fix it, I will get the code updated. Formatting and syntax highlighting is pretty close to the IDE.

ScriptTracker will enable something similar to Trevor's script for binary stacks. It exports all of the scripts from a stack to external files that can be edited in an external editor. There is an option to have ScriptTracker watch that directory and whenever a file changes it will automatically import it back into the stack. It will even retry an import if the object is busy the first time (I use it to update the tool itself sometimes). It doesn't care what editor is being used to edit the files since it is just watching for file changes.

Re: Does Livecode have a prettify option?

Posted: Sat Jul 25, 2020 4:51 am
by karmacomposer
I do use Sublime Text with Livecode formatting. However, sometimes I just want to quickly edit something. Livecode's script editor chokes with large scripts, so I copy and paste into notepad to do quick search and replace or editing and then copy and paste back again to save the script.

I do not and will not use Livecode Server for my current needs.

Mike

Re: Does Livecode have a prettify option?

Posted: Sat Jul 25, 2020 12:40 pm
by Mikey
Mike,
Just so we're clear, when you use LCS with ST or Atom, you are only using it for the purpose of getting it to check your code for errors, identify tokens, etc., live. You are not using it for anything else.

Re: Does Livecode have a prettify option?

Posted: Sat Jul 25, 2020 2:03 pm
by karmacomposer
LCS?

I use LiveCode. The language and it's included IDE (Business License).

I do not use LiveCode Server at all.

Mike

Re: Does Livecode have a prettify option?

Posted: Sat Jul 25, 2020 2:30 pm
by Mikey
sorry. livecode server

Re: Does Livecode have a prettify option?

Posted: Sat Jul 25, 2020 5:14 pm
by FourthWorld
karmacomposer wrote:
Sat Jul 25, 2020 4:51 am
Livecode's script editor chokes with large scripts...
Do you have a sense for how large? And what hangs?

I'd like to include tests for that for the script editor I'm making. Thanks in advance.

Re: Does Livecode have a prettify option?

Posted: Sat Jul 25, 2020 5:21 pm
by richmond62
SparkOut wrote:
Fri Jul 24, 2020 9:28 pm
For LiveCode I use the IDE Script Editor (for all its drawbacks)
Indeed.

The sheer fiddle of "bonging back and forth" between LiveCode and an external text editor does
not seem justified in view of the very few advantages gained from an external editor.

Re: Does Livecode have a prettify option?

Posted: Sat Jul 25, 2020 6:39 pm
by dunbarx
I find the SE perfectly adequate, especially now that the red dots stick. I would never write code in a text editor and copy back into the SE.

I have read of the features in other SE's, but am not sure how helpful they would be to me. Can someone give an example of a killer feature or two that might make me rethink this? More accessible and easier colorization won't do it.

Craig

Re: Does Livecode have a prettify option?

Posted: Sat Jul 25, 2020 7:27 pm
by bwmilby
I do tend to use the IDE most often, but one thing that is really helpful about Atom is that it can track differences between the current script and the previous commit in Git. It shows a line to the left of the text that will show where text has been added (green), changed (orange), or deleted (a thin horizontal red line). Of course I can see the same thing in Sourcetree (more traditional diff view), but I can't edit directly there.

I also find it easier to browse scripts in a stack project since there is a tree view available on the left side showing all of the scripts in the stack. This view will also indicate files (object scripts in this case) that have been changed/added since the last commit. Combined with the above, it makes it pretty easy to see what you have actually changed between the current version and the previous one.

Re: Does Livecode have a prettify option?

Posted: Sat Jul 25, 2020 7:32 pm
by bogs
dunbarx wrote:
Sat Jul 25, 2020 6:39 pm
I have read of the features in other SE's, but am not sure how helpful they would be to me. Can someone give an example of a killer feature or two that might make me rethink this? More accessible and easier colorization won't do it.
Craig, are you saying you have never used even a medium featured editor from another IDE? I am agog if that is the case.

Many text editors have GREAT features now, but I still find a well integrated editor built into an IDE a joy to use. When I think of great editors I've used in the past, MS (much as I don't care for them) probably produced the best overall experience, followed closely (for me) by Borland's.

For a mix between editor and IDE, though, for some reason I have not moved past Geany.

As to the 'what makes it better', that is really an individual thing, kinda like saying "What makes a dinner a dinner?", the answer being of course, that I can't define it, but I know one when I see it :twisted:

Re: Does Livecode have a prettify option?

Posted: Sun Jul 26, 2020 12:31 am
by karmacomposer
richmond62 wrote:
Sat Jul 25, 2020 5:21 pm
SparkOut wrote:
Fri Jul 24, 2020 9:28 pm
For LiveCode I use the IDE Script Editor (for all its drawbacks)
Indeed.

The sheer fiddle of "bonging back and forth" between LiveCode and an external text editor does
not seem justified in view of the very few advantages gained from an external editor.
LOL. Look at it this way, with over 10,000 lines of code in one script, it takes the editor several minutes just to buffer a single word.

It's laughable how slow it gets - and on a core i7 octacore with 32gb ram - a gaming laptop. All other text editors run without incident. LC's editor just cannot handle such large scale scripts. However, I need to compile them, so I have to copy and paste them back into LC at some point.

Mike

Re: Does Livecode have a prettify option?

Posted: Sun Jul 26, 2020 12:36 am
by karmacomposer
FourthWorld wrote:
Sat Jul 25, 2020 5:14 pm
karmacomposer wrote:
Sat Jul 25, 2020 4:51 am
Livecode's script editor chokes with large scripts...
Do you have a sense for how large? And what hangs?

I'd like to include tests for that for the script editor I'm making. Thanks in advance.
Our stack script holds ALL the technology and commands - which is now an API for other programmers to use on our projects. That way, I can hide/password protect the core tech that took me 3 years to develop. It must have somewhere around 100,000 lines of code.

Other scripts (card, objects) can have a few hundred lines to many thousands of lines.

In all cases, if you load in the stack script and then any other - grrrr. You could wait for minutes or even tens of minutes to do anything - making it impossible to use really.

I tend to use Sublime or if in a rush to fix bugs, notepad or notepad++.

My favorite IDE is WeBuilder but it does not have syntax for Livecode. It has everything else, however.

Mike

Re: Does Livecode have a prettify option?

Posted: Sun Jul 26, 2020 1:30 am
by FourthWorld
Thanks, Mike. That's very helpful.

Curious: if you copy and paste the long script into a new field in a new stack (no scripts in play), how is editing there?

That will help us identify how much of what you're seeing is specific to the IDE and how much may be opportunities to optimize the field object.

Re: Does Livecode have a prettify option?

Posted: Sun Jul 26, 2020 3:27 am
by dunbarx
I have scripts with thousands of lines (not 100,00, though) and notice no delays at all in any action I take. Never. Everything is instantaneous.

Am I missing something? The LC SE sits open to the stack I am working on, and like everyone, I go back and forth, running and testing, running and fixing, cursing and fixing, whatever, and not a blink of delay. Wherefore are these minutes? I had no idea this was an issue.

What is anyone doing that takes any noticeable time at all?

Craig

Re: Does Livecode have a prettify option?

Posted: Sun Jul 26, 2020 6:21 am
by jacque
I wonder if it would be faster if you turn off all the editor options -- colorization, bracket completion, suggestions, etc. I have almost all of them off and see no delays, but I don't have scripts that long either.