Page 1 of 1

Your favourite text editor for working with livecode

Posted: Thu Jul 29, 2021 3:18 pm
by bbalmerTotalFluency
Hello:

I know this forum is stacked out with cool types. I'm interested in whether the cool kids use the built in IDE (if you do then I will be happy to follow your lead) or do you like to make script only stacks and use some other text-editor? Not looking for theory. Looking for what people who write more code than I do - actually do when they are coding. If "yes" to external text editor then which is your favourite?

Thanks in advance.

Bruce
These days an amateur programmer

Re: Your favourite text editor for working with livecode

Posted: Thu Jul 29, 2021 4:58 pm
by FourthWorld
I'm not cool so this may not apply, but FWIW I almost always use binary stacks, and edit their scripts within the IDE.

Re: Your favourite text editor for working with livecode

Posted: Thu Jul 29, 2021 5:19 pm
by Klaus
Yep, same here!

Re: Your favourite text editor for working with livecode

Posted: Thu Jul 29, 2021 5:23 pm
by bbalmerTotalFluency
Blimey! I recognise you two from these forums and you are more full time and cooler than I am (at least with regard to LC ;-) so I find these two answers VERY interesting. Thank you.

There is a lot to like about the editor - I explore leaving it from time to time but generally don't prefer what I find. I thought it might be a lack of cool, but I see I am in good company.

I had received / hallucinated the impression that script only stacks and the separation of the binary stacks and script only stacks was considered to be a best practice of sorts. I'm not wrong AGAIN am I?

Re: Your favourite text editor for working with livecode

Posted: Thu Jul 29, 2021 5:54 pm
by stam
You may want to check out Atom - you can install an integration for LiveCode that will style text, indent it and spot errors; just won't run the code (obviously...). For longer scripts it's much smoother than the built-in script editor

I'd like to use BBEdit more, but while it has support for LCB, it won't autocomplete double quote parentheses etc, won't indent text and doesn't hilite errors. Plus the (dark) colour scheme in Atom looks a lot better imo.

However while I was initially using a lot of script only stacks early on, i must say i'm pretty much binary only now, so that means copy pasting a lot between LC and Atom - i pretty much only do that when i want to really focus on a long script or do extensive corrections/replacements.

Re: Your favourite text editor for working with livecode

Posted: Thu Jul 29, 2021 6:25 pm
by jmburnod
I always use livecode ide
Best

Re: Your favourite text editor for working with livecode

Posted: Fri Jul 30, 2021 1:38 am
by bbalmerTotalFluency
Thank you for weighing in.

Re: Your favourite text editor for working with livecode

Posted: Fri Jul 30, 2021 11:04 am
by Bernard
FourthWorld wrote:
Thu Jul 29, 2021 4:58 pm
I'm not cool so this may not apply, but FWIW I almost always use binary stacks, and edit their scripts within the IDE.
Me too. I use the editor of LC IDE, re-factoring into Script-only Stacks (SoS). These are periodically committed to my Fossil vcs (both SoS and non-text elements get committed).

For me there is only one piece of functionality I find is missing from the IDE editor - when there are hundreds of handlers in a SoS it can take minutes to find what I'm looking for and that breaks my flow. So I have a tree plugin which changes to show me the handler signatures of whatever is the active script in the IDE editor. The handlers are grouped based on functionality (the grouping is determined by a comment in each handler). That grouped handler list can also be filtered based on some key word. Clicking on the signature of a handler in the tree pastes that signature into the cursor location of the editor. This way it takes seconds to find the relevant handler and I'm still in the flow: move mouse to tree, click on disclosure triangle for that area of functionality, glance down handlers, click, go back to script editor and continue typing.

Re: Your favourite text editor for working with livecode

Posted: Fri Jul 30, 2021 11:13 am
by richmond62
The only time I have ever used an external 'something' was during the initial 3 years of my Devawriter Pro
because I had switch statements with up to 3000 cases, so I used Apple/Clarisworks just because I found
it gave me more space than the inbuilt scriptEditor.

But at all other times I have used the inbuilt scriptEditor as I think it is marvellous.

Re: Your favourite text editor for working with livecode

Posted: Fri Jul 30, 2021 1:23 pm
by bwmilby
I do a bit of editing in Atom. No need to manually copy/paste though. Take a look at ScriptTracker if you would like to edit your scripts from binary stacks in an external editor. It also allows easy tracking of script changes in a stack using Git.

Re: Your favourite text editor for working with livecode

Posted: Fri Jul 30, 2021 1:35 pm
by stam
I will definitely check that out, thank you Brian

Re: Your favourite text editor for working with livecode

Posted: Fri Jul 30, 2021 2:09 pm
by Mikey
More recent versions of the script editor are better than the older ones in a lot of ways. I use it regularly, but I prefer sublimeText for LC scripts. It has many more features than the script editor, it is much more customizable and extensible (and much faster). It launches way faster than Atom, and Trevor's very clever python script auto-reloads your scripts in LC whenever you save them in ST, meaning that ST is a great way to upgrade the script editor.
Obviously if you are going to just use binary stacks and not behaviors, then the script editor is your tool.
Atom is prettier and more elegant/refined than ST is, to be sure.

Re: Your favourite text editor for working with livecode

Posted: Fri Jul 30, 2021 8:23 pm
by jacque
I use the IDE editor almost always. I rarely use script-only stacks, except for client work where they've already been implemented by someone else. The main reason to use script-only stacks is for compatibility with git, which only tracks text files, and script-only stacks were first implemented when LC started using git. There is no "best" way, only the way that works best for your own work flow.
stam wrote:
Thu Jul 29, 2021 5:54 pm
I'd like to use BBEdit more, but while it has support for LCB, it won't autocomplete double quote parentheses etc, won't indent text and doesn't hilite errors. Plus the (dark) colour scheme in Atom looks a lot better imo.
You can do most of these things in BBEdit, which is my text editor of choice. In Preferences/Completion select "Insert matching delimiters while typing" and "Surround selected text when typing matching delimiters".

You can sort of auto-indent; once you've typed a tab all subsequent lines retain that tab position. You do have to delete to move back one tab stop though so it's semi-manual. You can set the tab stop width in Preferences/Editor Defaults. Dark mode is available in Preferences/Appearance and you can edit the color scheme there too. You're right it doesn't know about parsing errors though.

I have set up custom Clippings to use LC's commenting keyboard shortcuts in BBEdit.