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 increments. Maybe the effect would have been better with smaller increments?