Features I’d like to see in my Editor.

Do you ever have pipe-dreams about what you should be able to do with your computer? Like those crazy virtual interfaces like they had in the movie Minority Report or like every CSI lab seems to have? (well, that’s at the movies, of course). What about just more down-to-earth matters such as making large, complex documents such as source code more legible? I have few ideas—maybe a bit wacky.

Let’s pretend we have a piece of code (one that you have seen before already):

This is already pretty legible—at least according to my tastes. What could we do to make it even more legible?

Enhanced Scope Visibility. With an editor like Emacs, you already have parentheses/brackets/braces/chevrons matching/highlighting in most “major modes” like C, C++, Java, XML, etc. If it cues you visually on the matching element by highlighting both, it doesn’t show you how scopes are nested, unless you walk between nested elements using … well, some short cut like C-M-u and C-M-d. I’d much rather have a scope highlighter that could work like this:

Which would work, if the shades allowed are subtle enough, in many color schemes:

Adaptive Reduction of Visibility. If you edit complex code, the editor’s screen eventually fills up with text. The more complex the things you are editing, the more the screen looks cluttered (in my opinion) and you have to make an extra effort to concentrate on the precise object you are editing. The very counter-intuitive thing to do is, rather that put more stuff on the screen, is to make sure you see only the stuff you need to see, and somewhat reduce the number of things one can view. One possible solution is to use a spotlight of sorts:

which would be controllable or disabled by the user any time it’s in the way; for example, binding meta+wheel to adjust the radius; another solution could be to apply some kind of hyperbolic deformation of the lines:

(OK, clearly, I’m not a GIMP ninja just yet). But imagine that it is smoothly warped with texture filtering and everything you want so that text remains legible until it gets really small. Imagine also that the degree of curvature depends on the scope surrounding your cursor; a small inner scope would cause more warping to the rest of the text, a larger scope would cause less or even no warping, depending on how large it would be.

Maybe this last one is too much? That’d be a neat alternative to the [±] boxes we have to collapse/expand functions.

*
* *

I think, however, that the only really useful one, that needs the less getting used to, is the “enhanced scope visibility” mode. However, to work properly, it has to be subtle; the effect cannot be achieved without melting your eyes on a 16 color display. You must have many shades of the background color available, and maybe finer shades than in the example. In the example, I show \approx{}10\% increments. Maybe the effect would have been better with smaller increments?

5 Responses to Features I’d like to see in my Editor.

  1. The “Enhanced Scope Visibility” is the best features an editor could have since syntax highlighting. I’m a vimmer and if emacs could do that, I would switch in an heartbeat.

  2. Martin says:

    I concur. I would love to see the “Enhanced Scope Visibility” in emacs.

  3. […] Having a decent editor is something we have discussed before. Last time, I was telling you about features that I wanted for programming, such enhanced scope visibility. […]

  4. Fouad says:

    Eclipse has plugin which does the Enhanced Scope Visibility/block highlighting. Allows you to customize the colors and behavior by programming language.

    http://marketplace.eclipse.org/content/editbox

    n.b* it’s free !

  5. angelo says:

    look for theide, ultimate++, it does, but unfortunately, has a very hard way of manage code projects.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: