For a long time now I've really wanted to be able to use vim to edit text areas in my browser (opera).
I've noticed a bunch of plugins for firefox but even they only work with moderate degrees of success, and I certainly hadn't come across anything for Opera ... until now!
I was on one of my quartly searches for something that might do this in a not-suck manner, and I finally stumbled on gold. Some clever person decided that since we're all running an X server, some of the X automation stuff could be used to make this all work. The process goes something like this ...
- First detect the focussed window (and get its WindowID)
- Next hit CTRL-A, CTRL-C (using Xautomation stuff)
- Using xsel (or optionally xclip) blat the clipboard out to a temp file
- Invoke [your favourite editor here] on the temp text file
- When editor exits, grab temp file back to clipboard
- Put CTRL-A, CTRL-V in the window
This is so bloody simple I don't really understand why I hadn't thought of it before, but after a little bit of tweaking I managed to make it work quite nicely in ion3 and opera.
I even wrote this blog post using gvim :-)
Head on over to http://bur.st/~benc/site/?external-edit to get your copy today!
If you have any trouble making it work, feel free to drop me a line and I can try help out. I have a reasonable amount of experience with doing xautomation stuff because it's how I use my pastebot too!
For the curious, I have a binding in ion3 that takes the current contents of the clipboard, pastes it to the pastebot, retrieves the paste URL, and puts that back on the clipboard for me before "middle clicking" to actually paste the URL.
This means by simple highlighting a bunch of text, I can easily pastebot it, and paste the corresponding URL all in one key press :-)
How about adding a small README.xautomation or README.ion3 explaining your bindings to the pastebot git repo?
Always with the more work ;-)
But yeah, a good idea, and one I"ll get around to sometime hopefully :-)
I'm starting to think I need a bug tracker :p
link is down :(