Scope aware variable indicators

Starting from v0.38 ZeroBrane Studio includes experimental support for scope aware variable indicators. These indicators are added to mark local, global, masked, and masking variables and are calculated in real-time as the code is being written. Having this ability changes the way you write code, and does catch a lot of errors and 'wrong thinking' cases.

ZeroBrane Studio provides default indicators that can be updated; both the colors and the appearance can be changed as described in the documentation. For example, styles.indicator.varmasked = nil will disable masked indicator.

In addition to providing real-time indicators, the IDE uses the same mechanism to provide "Go To Definition" and "Rename All Instances" options available from the popup menu in the editor. The items in the popup menu also show the number of instances detected and the line where the definition is found. "Go To Definition" item is enabled for local variables/functions, function parameters, and loop variables.

You can quickly select instances of a variable by doing Ctrl/Cmd-DblClick on it. All instances get selected with the main one having slightly darker background and can be edited to update the name. In addition to that you can navigate selected instances using Find Next/F3 and Find Previous/Shift-F3; it will move the selection to the next/previous instance (and scroll the editor to make it visible).

You should get a copy of my slick ZeroBrane Studio IDE and follow me on twitter here.

4 Comments

First of all, a thousand times "thank you!" for this beautiful application. It's a very cool program and really convenient too :) Good work!

With your permission, I would like to kindly ask; is it difficult to add Perl support? Only for the editor, not for debugging and such...for now that is. Is it easy to do it with Lua's API? I'm new to Lua, that's why I'm asking.

@ToApolytoXaos, than you for the feedback! If you are looking just for syntax highlighting, it should be doable; you just need to come up with a spec file to handle .pl and .pm files and load that spec file. spec/cpp.lua spec file may be a good starting point.

I think the question is why wouldn't you use something like Padre if you are looking for a Perl IDE? Padre is also wxwidgets/Scintilla-based and is in many ways similar to ZBS.

Yeah, I have tried Padre on my system (Debian testing) and would crash on use of debugger. I guess I either did not use it properly, or got so lucky that hit a bug on first time-use.

Project Anarchy just released by Havok. It's using Lua as main scripting language. But the Project Anarchy's embed Lua editor is windows only. I think ZeroBrane Studio should support Project Anarchy and becomes THE project anarchy lua editor Mac!

Leave a comment

what will you say?
(required)
(required)

About

I am Paul Kulchenko.
I live in Kirkland, WA with my wife and three kids.
I do consulting as a software developer.
I study robotics and artificial intelligence.
I write books and open-source software.
I teach introductory computer science.
I develop a slick Lua IDE and debugger.

Recommended

Close