1) If we assume someone writes something like this that is not buggy, then for all those vi hackers out there, surely it’s a better alternative than the current plain textarea? (Having said that, you could use one of those plugins to open textarea content in vi).
2) The Vimperator extension for firefox, which makes firefox behave like vim, could use something like this for an even better “vim feel”. I believe something like this is actually on the TODO list.
I’ve been wanting to write my own for a while, so I could embed it in a textbox. Anyone who says this is a waste of time simply doesn’t use vim. I use the same keybindings in standalone, in my IDEs, on the command line (set -o vi), for mail, etc.; the only place I can’t use it is in the browser.
Looking forward to your GM script. Hopefully, the developer will open up the license – what on earth is a license like this doing on a subdomain named “gpl” :).
Not too sure about the way it expands to the whole page. I’d rather use vim bindings inside a normal textarea like viedit mentioned above.
Comment by Michael Mahemoff — May 30, 2007
Well I tried to use a vi trick and goto the end of the file by specifying :18282282 (ie. an arbitrary large number). My browser then proceeded to freeze and crash.
Perhaps a .length() > component check might be useful . :-|
If I was wanting to go to the end of the file I’d use a vi trick G.
Comment by saltyDog — June 1, 2007
To answer some questions:
1. It’s primarily part of our netMail email client. This may account for a great deal of bugginess as it wasn’t originally designed to run standalone.
2. It might see a more liberal license in the future, but it certainly won’t see a more restrictive one. If you can’t wait, you can buy a hosting account which gives you redistribution rights, but not the ability to grant redistribution rights (i.e. lets you put it on your website)
3. The server gpl.internetconnection.net hosts mostly GPL stuff. Things like cexec, mtftar, ntifconfig, isinzip, ipa, and samdump (for example) are all gpl. They’re there on purpose (as you can see from them being listed on the index).
4. GPL.internetconnection.net is a test box: I uploaded jsvi to it (ripped out of netMail) to refer to it on a reddit comment. The server also responds to src.internetconnection.net- which is the URL I originally used, but nobody bothered to notice that.
5. Other vi-in-js attempts work on simulating vi modes instead of simulating ex itself, which is why “VIEDIT” and friends are worthless.
Its GPL and/or Apache License, so use it for whatever :-)
Supported Browsers: Firefox, IE (unfortunally not Opera), Safari on Windows works, but on Mac I couldn’t test it.
It took ~14k lines of sourcecode, however the GWT-compiler will turn this to ~1400 lines (is ~150kb) to download by user.
I guess everbody has its own subset of command to use, I coded everything I found important and use everyday. Unfortunally one has to decide on some subset. vim is said to have ~8500 commands, So if I coded 2 every day, I’d be busy 10 years :-)
@sotto :help i haven’t implemented also, sorry about that ;)