While I think gpscript is awesome, I do find the editor a bit clunky compared to other text editors and/or IDEs I’m accustomed to. I’ve also hit some buggy behavior. This is really not a complaint as GP is meant to be a great host first and foremost, not a development environment unto itself.
I was wondering if any of you are using an external editor for your gpscripts, and if so, which one or ones seem to work best for you?
I added an If block nested under another If block into my On WidgetValueChanged callback handler. I forgot the ‘Then’. I compiled, and as expected I got a compilation error. I added the ‘Then’ in and still got the compilation error. I moved the nested If block after instead of nested in the other If block and compiled successfully. I could then re-nest the If block back into the other If block and compile successfully.
It is almost as it wouldn’t recognize that I had added the ‘Then’ to the If block until after I completely moved it out and moved it back in.
This happened two different times through my scripting session last night as I continued to change and hopefully improve my approach and outcome.
But, not having search/replace and font size ( my eyesight decreases with age ) options makes my every day life with the GP script editor quite difficult.
I would LOVE a gpscript plugin for Notepad++, but I seriously doubt it would ever happen unless I personally write it myself… and I do enough development at the office already.
Agreed There are already very good and versatile text editors, such as Sublime Text, I don‘t see why GP should include another custom one.
What currently keeps me from considering an external editor is the current need of having to editor windows (the GP Script editor and Sublime, for example) and manually having to copy and paste the code between those for every compilation.
So, I suggest a basic integration of external editors into GP:
User can specify a path to their desired editor executable
CTRL+Shift+3 activates external editor mode:
GP writes the same script that would be shown in the internal editor to a temporary file
GP launches the external editor to open that temporary file
GP watches that file for changes and recompiles it when changes occur: Saving the file in the editor triggers compilation.
As soon as the script goes out of scope (e.g. because another rackspace was selected, the temporary file is deleted from disk)
This would be great at least for me. What do you think about it?
Things like inserting templates and then pressing the TAB button to go to the next template part will be harder to implement and the template support in GP’s editor is one of the main reasons to use it I guess.