“Before you load this page, do that…”

I’m still working on my prototype XML editor, Verbosio, through yet another infrastructure project.  This time, it’s through a “multi-dimensional hashtable” concept, bootstrapped from ECMAScript Harmony WeakMap objects.  You can read about my “DimensionalMap” concept and plan here.  That’s not why I’m writing, though.

When I’m working on a typical project, I’m usually alternating between three windows:

  • the browser
  • the editor
  • a shell or command prompt

That’s a little painful.  For DimensionalMap, I’m deliberately keeping the various components in different files, and assembling them together via a Makefile.  This gave me an idea:  what if a special URL could re-run make and force these files to rebuild?

First, the Makefile, which launches Firefox (given a path to the browser) with a custom profile.  Second, a custom protocol handler which I call “jasmine:”, after the very nice Jasmine test harness, which DimensionalMap uses.  This protocol handler’s sole purpose is to call make build before loading the Jasmine test page.

Effectively, that reduces me to two windows to work with:

  • the browser
  • the editor
  • a shell or command prompt

It makes a difference.  Now, if I knew how to incorporate Komodo Edit or Bespin/Ace/Cloud9 as a local file editor extension into the custom profile, it’d be down to one window.  That would be very, very nice indeed.

DimensionalMap is under MPL/LGPL/GPL tri-license.  Comments, reviews and patches are quite welcome.

5 thoughts on ““Before you load this page, do that…””

  1. Hmm, what sort of Gecko are you targeting? I ask because Komodo 7b1 is Gecko 7 at this point; if that’s new enough, you might be able to run your test Verbosio instance as a Komodo extension instead, in which case this would sort of work. If you need a newer Gecko, though, it wouldn’t.

    What do you use as a text editor now? I thought there were extensions to embed emacs or vim into firefox, but I can’t seem to find it. Perhaps I imagined them.

    (Note that I’m biased on this, of course 😉 )

    1. FF6+. Also, it’s worth noting this isn’t Verbosio-specific. I’m writing DimensionalMap to be Web-safe, able to work in any browser that supports WeakMap. The test page is just an ordinary Jasmine web page.

  2. You should try with a second monitor (with a third it’s even better). A console like “guake” helps too – you use a shortcut key to show/hide it and it can be semi-transparent.

  3. I’m looking forward to more editing in the browser as well. Firefox 8 and up incorporates a source code editor (hidden behind a pref in 8 and turned on in 10). Someone “just” needs to add file handling.

Comments are closed.