- installed copy of Mike Ferris' incredibly useful TextExtras bundle.
- installed copy of the carbonized Vim from Benji Fisher's page.
- my vimwrapper.pl script.
- my .TEUserPipes.plist file.
Read the rest of the article for the details on this trick...
You'll need to edit vimwrapper.pl a little bit, to tell it where your copy of Vim is installed. You might also want to add options to its list. At any rate, modify it as needed and drop it somewhere useful; I put mine in ~/bin/.
Okay, now test it... the way it should work is when you pipe text into vimwrapper.pl on stdin, it should launch Vim with that text in the buffer. You edit the buffer, and when you quit Vim your modified text is dumped back to stdout. So you can test it with "echo 'some junk' | ~/bin/vimwrapper.pl".
If all goes according to plan, you'll want to define a 'User Pipe' for vimwrapper.pl in TextExtras. That TEUserPipes.plist file does this: it both defines the pipe to ~/bin/vimwrapper.pl and binds it to the "CMD-\" keystroke. Move that file to ~/.TEUserpipes.plist. You should be good to go at this point. Fire up TextEdit and give it a go.
This trick-- with a little modification of the supplied script -- should actually work for any editor you might wish to use (even emacs, I suppose).
NB: TextExtras does not get loaded in Mozilla. I don't know why, exactly.
[Editor's note: I'll display my complete lack of knowledge here by stating that I have close to no idea what this hint does, but boy, it sounds cool! Obviously, I have not tried this hint on my system ;-)!]

