Does Livecode have a prettify option?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 361
- Joined: Wed Apr 27, 2011 2:12 pm
Does Livecode have a prettify option?
In other languages/IDE's there is a prettify feature. It pretty much takes the code and makes sure it indents properly.
I write a lot of Livecode code either in Sublime or even notepad/notepad++
However, the code, when pasted into Livecode's editor, does not indent automatically. I would have to press enter on each
and every line to make it look right.
Is there a one key/command to do this for all the code of a given script?
Thanks.
Mike
I write a lot of Livecode code either in Sublime or even notepad/notepad++
However, the code, when pasted into Livecode's editor, does not indent automatically. I would have to press enter on each
and every line to make it look right.
Is there a one key/command to do this for all the code of a given script?
Thanks.
Mike
-
- VIP Livecode Opensource Backer
- Posts: 9660
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Does Livecode have a prettify option?
Hi.
Clicking the tabKey will indent the entirety of the SE. You have to select "autoFormat" in the SE preferences. You can also set the width of the indentation.
Craig
Clicking the tabKey will indent the entirety of the SE. You have to select "autoFormat" in the SE preferences. You can also set the width of the indentation.
Craig
Last edited by dunbarx on Fri Jul 24, 2020 4:26 am, edited 2 times in total.
-
- Posts: 361
- Joined: Wed Apr 27, 2011 2:12 pm
Re: Does Livecode have a prettify option?
Ty. I will try that.
Mike
Mike
Re: Does Livecode have a prettify option?
Is there any reason you are copying/pasting into the SE instead of using Script-Only Stacks?
Is there any reason you aren't using the nifty ST connection to LC Server to get LCS to do your parsing for you and then ST to do the indenting?
Is there any reason you aren't using the nifty ST connection to LC Server to get LCS to do your parsing for you and then ST to do the indenting?
-
- VIP Livecode Opensource Backer
- Posts: 135
- Joined: Tue Feb 23, 2010 10:53 pm
- Location: Saint Louis, Missouri USA
Re: Does Livecode have a prettify option?
What does ST stand for?
Bob
Thanks,the nifty ST connection to LC Server
Bob
Re: Does Livecode have a prettify option?
Heh Mikey, maybe not everyone knows about those things is probably it. I didn't (and still don't), bobcole didn't know about at least one of em.
You just might be a little more advanced than a LOT of others
You just might be a little more advanced than a LOT of others
-
- VIP Livecode Opensource Backer
- Posts: 7233
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Does Livecode have a prettify option?
Slight correction: the tab key formats the handler containing the insertion point. Shift-tab formats the entire script.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Does Livecode have a prettify option?
ST is Sublime Text.
I am not a fan of being a little more advanced than a lot of others. Let's fix that, and then let's chase Trevor down.
I am not a fan of being a little more advanced than a lot of others. Let's fix that, and then let's chase Trevor down.
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Does Livecode have a prettify option?
I can think of several, depending on the needs of a given project and team.
What is the benefit of round-tripping to a server to access a routine available right in the local install?Is there any reason you aren't using the nifty ST connection to LC Server to get LCS to do your parsing for you and then ST to do the indenting?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Does Livecode have a prettify option?
I am a big fan of you being a little (or in this case, a LOT) more advanced than I am, for instance, I would really shudder if I were the top of the curve, so to speak.
Every day, I am quite thankful there are any number of people that participate here that I learn so much from.
Sublime Text is certainly a top end editor, but isn't everyone's cup of tea, is there a way to duplicate whatever you're using it for in other editors?
Re: Does Livecode have a prettify option?
@4W
The advantage is getting live syntax checking/colorizing/indenting without being locked into the SE, for those people who don't like the SE, or prefer another tool.
@bogs
The LC team prefers Atom. I'm ok with Atom. It's definitely more refined than ST is. It's the muscle car/luxury car or Android/iPhone argument. ST is faster, but you're in the weeds more.
The other reason to use ST is because of a nifty Python script Trevor wrote as a plugin for ST - I don't think it works with Atom, and I was never able to get it to work with Atom - maybe someone else did. The plugin is triggered when you save a file in your project. It then pops a signal on a local network port (i.e. just on your machine). If you are using Levure for your project or if you've copied and pasted the listener code from Levure into your project, the script that you just modified will be reloaded. So you get the benefit of being able to work on scripts in your project in ST, but have them automagically reloaded as soon as you save them, as if you were editing in the SE. The only time this causes a problem is if the script you just modified is the one that LC is busy executing. Then LC will throw up a dialog, and won't reload the script. You would have to quit LC and then go back in.
Any of the editors from the ST/Atom tree (which starts with BBEdit, I believe), are similar enough that they should be able to talk to LC Server to give you syntax highlighting, indenting, etc, however, we are now past my pay grade, so someone else will have to pick it up.
If you prefer Atom, for example, you can install the language-livecode plugin for Atom. Then click on the link in the plugin editor in Atom and there is full documentation.
The advantage is getting live syntax checking/colorizing/indenting without being locked into the SE, for those people who don't like the SE, or prefer another tool.
@bogs
The LC team prefers Atom. I'm ok with Atom. It's definitely more refined than ST is. It's the muscle car/luxury car or Android/iPhone argument. ST is faster, but you're in the weeds more.
The other reason to use ST is because of a nifty Python script Trevor wrote as a plugin for ST - I don't think it works with Atom, and I was never able to get it to work with Atom - maybe someone else did. The plugin is triggered when you save a file in your project. It then pops a signal on a local network port (i.e. just on your machine). If you are using Levure for your project or if you've copied and pasted the listener code from Levure into your project, the script that you just modified will be reloaded. So you get the benefit of being able to work on scripts in your project in ST, but have them automagically reloaded as soon as you save them, as if you were editing in the SE. The only time this causes a problem is if the script you just modified is the one that LC is busy executing. Then LC will throw up a dialog, and won't reload the script. You would have to quit LC and then go back in.
Any of the editors from the ST/Atom tree (which starts with BBEdit, I believe), are similar enough that they should be able to talk to LC Server to give you syntax highlighting, indenting, etc, however, we are now past my pay grade, so someone else will have to pick it up.
If you prefer Atom, for example, you can install the language-livecode plugin for Atom. Then click on the link in the plugin editor in Atom and there is full documentation.
Re: Does Livecode have a prettify option?
Heh, funny enough you should mention Atom vs. Sublime, I actually prefer Geany, which I am off and on dev'ing a lang pack for. I guess it will now be the muscle car/luxury car/motorcycle or Android/iPhone/dumbphone argument.
(Really, from me, did you expect any less?? I can't leave well enough alone *anywhere*)
(Really, from me, did you expect any less?? I can't leave well enough alone *anywhere*)
Re: Does Livecode have a prettify option?
I tried out Atom on Windows. Quite an extensive trial over time. It sucked.
Last edited by SparkOut on Fri Jul 24, 2020 9:24 pm, edited 1 time in total.
Re: Does Livecode have a prettify option?
@sparkOut
What do you use? What didn't you like about Atom?
What do you use? What didn't you like about Atom?
Re: Does Livecode have a prettify option?
For LiveCode I use the IDE Script Editor (for all its drawbacks), or for LiveCode Server scripts, as well as general editing and web work, I use VS Code. Apart from anything else, it has the best s/ftp on demand client option that I have found.
Atom was clunky, slow, not intuitive to use, and seemed to be cobbled together from random modules mashed together.
Atom was clunky, slow, not intuitive to use, and seemed to be cobbled together from random modules mashed together.