Vimafarian

Adrian Rollett bio photo By Adrian Rollett

So in an earlier post, I complained about vimperator not being available for Safari. Well, like anyone else that’s completely nuts would do, I decided to pull myself up by my own bootstraps and have a go. You may find (and install) my limited but functional beginnings here.


Fantastic Idea!! Unfortunately, it seems that many of the hotkeys have become broken in Safari 4. As a fellow Vimperator user that would like to be able to dump Firefox for its insane memory hogging, I’m very excited to see this! I’d love to contribute to this. Perhaps we can bring it up to speed with Safari 4 and work on some more basic Vimperator functionality :D

Hi David,

glad you like it! I’ve thrown it up on github, feel free to fork and improve as you wish - it’s reached the ‘scratched the itch’ point for me…

http://github.com/acrollet/vimafarian/tree/master

I made a copy of the vimafarian file and added it as a new script to be able to experiment with it and try out some ideas in a more direct fashion without having to reinstall it everytime I broke something.

When I was messing around I quickly realized (and checked) that since vimafarian (actually all GreaseKit scripts) is loaded on a per tab basis you can’t have any global variables like a stack, making it impossible to add support for the undo operation that re-opens a closed tab.

One ugly work-around might be to implement some local ajax service that can act as a storage engine for the global vimafarian state. Another might be to use CouchDB, a DBMS that natively supports the CRUD-operations via http to implement a similar solution.

If there are more ways of creating a ‘global’ state of kinds that are more feasible I’d be very interested in contributing, but until then I’ll probably just use/modify vimafarian as/to be an accessibility aid.

I’m thinking about digging into the vimperator code to see how things are done, especially the hinting function, one of the things I’ve been missing most since I switched back to safari from firefox (+vimperator).

for global data storage, why not use the HTML5 client DB storage API? (example here) That’s a great idea, by the way. I would encourage you to check out the script on github and fork with any improvements, I’ll gladly roll new stuff in…

Wow, that’s one sweet demo :D.

I’m a little embarrassed to admit this but I don’t really know how to use git, so I’ll have to look into that first :P. But with that DB storage API I’m really interested in writing some serious code. It would also enable multi-key commands, making gt (among other commands) possible.

I was also thinking about the “statusbar” that vimperator provides.. Do you have any suggestions as to how one would go about to implement a similar feature? My thoughts immediately go to adding a div that is above everything on the page (really high z-index) at the bottom of the screen, but I think it would be ugly in the end because of its limitations in its interaction with safari, e.g. would it be possible (or even desirable) to have the wget-style loading-bar, among other things?

Another thing that I’m considering is how to make a statusbar like the one that vimperator provides, only better or at least more eye-appealing. In my mind I’m seeing something like quicksilver but with a much higher y-value so that it doesn’t just barge in going “HAAI GAAAIS” in the middle of the page.

There’s one thing that I’m really missing from vimperator - hinting to follow links. I’d like to discuss this feature and how it would be implemented before delving into it.

/Emilio


Post Comment