Posted by: 2stepsback | December 6, 2005

Editor idea: Block Zooming and Pop up

To see what I mean by Block Zooming in Code Editors, first let us see the immense utility of the code-folding available in the popular Scintilla text editor component. Have a look at Scintilla and note that the plus signs and horizontal lines hide entire functions. Similar code folding exists in Eclipse and all good editors based on Scintilla.

The next level would be as follows: You would have a zoom option which shows the code at different font sizes. You would be able to set what two sizes to zoom to (and back) on the click of a shortcut key. (Notepad++ already has zoom). Then, in a zoomed out view, only the first lines or names of the methods or functions would be shown in a large font and the rest of function in a small font to give an “overview” mode of display. In this overview mode, a small button would be available in a margin like in the line number margin (or on the page itself) . On clicking the button, a window would pop up, (much like javascript-based popup windows on the web) and show the code of the function in normal font. So you have the code in the background window in an overview mode and the code of the current function or block open in the popup window in (larger or zoomed in) normal mode. This is much closer to the way we tend to organize code in our minds.

Web based editors like TinyMCE can implement this functionailty straightaway since all they have to do is pop up a javascript window. Of course the key here is that the popup window has to have most of the functionality of the main window. It needs to have the same syntax highlighting, similar look, same autocomplete if the original window has it, and so on. That is the hard-work part. That is probably why the idea has not yet caught on, or maybe, just maybe people have not yet thought of it (ok ok, I agree its the first reason). However, this is hardly a bad open source project to start off your open source life with. A good start would be something on the lines of, but not as complicated as TinyMCE, with this zooming option.

Advertisements

Categories

%d bloggers like this: