Apologies for the slight threadcromancy:
One feature I love and miss most from Visual Studio/NetBeans etc is user defined code regions. Some users hate them, some don't. Would it be possible to have an equivalent in ZeroBrane? I wanted to implement the functionality in Notepad++ but the easiest way of doing it was for some reason removed in newer versions, which now require you write a lexer in C (or was it C++?) which I just can't be bothered to do. For those unfamiliar with what I'm talking about (or maybe my explanation just sucks) check this:
Before:
After:
The #region and #endregion tags are ignored by the compiler (but not the stuff between them - folding is strictly for in-IDE organisation), allowing you to fold code where you want and give it a meaningful name. I found it useful when I was working on classes that were somewhat big - instead of trying to remember where I'd left an event, I simply had a region of events (which may have sub-regions if there were many events that could be further logically grouped).
Now that particular way of doing things is neat, but it requires the compiler be actively aware of what #region means and to ignore it for compilation. This can't really be done for Lua/Love (well, maybe, but that's another drama) so maybe the NetBeans way of doing it might be more easily implemented.
NetBeans example (sorry I don't have it installed at the moment):
Code: Select all
//<editor-fold desc="consts">
string a = "random string";
int b = 7;
//</editor-fold>
It accomplishes the same thing, but declares the fold within a Java-style comment, so that it works in all Java compilation environments (I think Notepad++ respects the editor-fold tags as well, which is neat).
Replicating the behaviour in Lua could be something like:
Code: Select all
--<fold name="consts">
scale = 1;
sys = "undefined";
width = 0;
height = 0;
--</fold>
Appropriate use of regions can greatly clarify your objects/scripts etc while keeping your code organised and allowing you to focus on what you specifically want to do instead of wading through context irrelevant code.
Also if ZeroBrane already supports this concept, sorry for the longish post