I’m a beginner but my device/agent programs are getting longer and longer, and it’s difficult to keep track of them on the small windows shown by the IDE. But copying these programs to MS Word, for example, loses indentation and the color scheme of the IDE. Is there any better way to keep track of longer device/agent programs besides the IDE, or some way to make the IDE windows full screen, or some way to store them off line formatted for editing purposes? Thanks in advance for any suggestions.
Have you tried collating your code into classes and tables? If so, you can use Alt-0 and Alt-Shift-0 to collapse and expand structures.
I use notepad++
It’s a nice editor for scripting
It can highlight opening and closing tags, parenthesis, brackets, if-statements, etc.
Squirrel is not one of languages on its list, but you can create your own custom one that has Squirrel’s syntax configured. It also numbers lines. That helps too.
You could also try the fullscreen code editing mode. The button is in the top right-hand corner of the editor pane - I’ve attached a screenshot.
I edit my device and agent code in an editor locally (I use vim, but alternatives exist) and then use the Build API(*) to push the code. This means that I can (a) keep my code in git, and (b) do some preprocessing in the same way as smittytone’s Squinter project. vim also has syntax colouring for Squirrel source files, which is useful.
(*) I lied; I actually use the internal API that the IDE currently uses, because the public Build API didn’t exist when I wrote my scripts; you should use the Build API – that’s what it’s for.
Thanks for all comments. I will try to understand them as I go along.
coverdriven: Sorry, I do not understand your comment. Is there a further explanation somewhere of classes, tables, and what alt-0 does?
rogerlipscombe: I read the description of Build API but so far it is not clear to me how to actually use it on Windows 7. I will keep working on it.
I assume that there is no way to simply store the device/agent code directly to a disk file and then load it back after editing, although I suspect that is what Build API might do if I can figure out how to actually use it.
Thanks again for all comments.
Check out this discussion : https://forums.electricimp.com/discussion/comment/17230/#Comment_17230
One of the more advanced setups would be my project:
It lets you build libraries and include them in the main project. You can then upload to the cloud and log locally.
And for Mac folks who prefer a GUI: https://forums.electricimp.com/discussion/2869/mac-users-squinter-utility-for-managing-device-agent-code-and-libraries#latest.