Does Livecode have a prettify option?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

bwmilby
Posts: 356
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: Does Livecode have a prettify option?

Post by bwmilby » Sat Jul 25, 2020 12:22 am

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

Script Tracker https://github.com/bwmilby/scriptTracker

karmacomposer
Posts: 355
Joined: Wed Apr 27, 2011 2:12 pm

Re: Does Livecode have a prettify option?

Post by karmacomposer » Sat Jul 25, 2020 4:51 am

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

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 728
Joined: Fri Jun 27, 2008 9:00 pm

Re: Does Livecode have a prettify option?

Post by Mikey » Sat Jul 25, 2020 12:40 pm

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.

karmacomposer
Posts: 355
Joined: Wed Apr 27, 2011 2:12 pm

Re: Does Livecode have a prettify option?

Post by karmacomposer » Sat Jul 25, 2020 2:03 pm

LCS?

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

I do not use LiveCode Server at all.

Mike

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 728
Joined: Fri Jun 27, 2008 9:00 pm

Re: Does Livecode have a prettify option?

Post by Mikey » Sat Jul 25, 2020 2:30 pm

sorry. livecode server

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8322
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Does Livecode have a prettify option?

Post by FourthWorld » 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.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

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

Re: Does Livecode have a prettify option?

Post by richmond62 » 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.
Last edited by richmond62 on Sat Jul 25, 2020 7:03 pm, edited 1 time in total.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7321
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Does Livecode have a prettify option?

Post by dunbarx » Sat Jul 25, 2020 6:39 pm

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

bwmilby
Posts: 356
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: Does Livecode have a prettify option?

Post by bwmilby » Sat Jul 25, 2020 7:27 pm

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

Script Tracker https://github.com/bwmilby/scriptTracker

bogs
Posts: 4890
Joined: Sat Feb 25, 2017 10:45 pm

Re: Does Livecode have a prettify option?

Post by bogs » Sat Jul 25, 2020 7:32 pm

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:
Image

karmacomposer
Posts: 355
Joined: Wed Apr 27, 2011 2:12 pm

Re: Does Livecode have a prettify option?

Post by karmacomposer » Sun Jul 26, 2020 12:31 am

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

karmacomposer
Posts: 355
Joined: Wed Apr 27, 2011 2:12 pm

Re: Does Livecode have a prettify option?

Post by karmacomposer » Sun Jul 26, 2020 12:36 am

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8322
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Does Livecode have a prettify option?

Post by FourthWorld » Sun Jul 26, 2020 1:30 am

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.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7321
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Does Livecode have a prettify option?

Post by dunbarx » Sun Jul 26, 2020 3:27 am

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5792
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Does Livecode have a prettify option?

Post by jacque » Sun Jul 26, 2020 6:21 am

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”