Neat regardless.
Haven't looked at the code yet, but I wrote:
https://github.com/Julian/dotfiles/blob/master/.config/pytho...
which does something similar (and is interpreter agnostic as it looks like this is).
But yours is able to do that because your importing a top-level edit function while I was pretty set on dynamically creating a vim() method and not having to import a function (just a module).
I love how yours lists the globals though! I might just have to bite that feature :).
See:
[1] http://wiki.ipython.org/Cookbook/Connecting_to_a_remote_kern...
Define a procedure, macro, or record type called foo:
(define (foo x) ...)
Now say: ,(edit foo)
Your definition appears in the editor of your choice. (Try running GT within Emacs and setting your EDITOR to "emacsclient".) Make changes; provided no errors occurred (like missing parens) the changes take effect when you save and quit.It's a nice little workflow; if you squint, it almost feels like a CADR...