Vi in JavaScript, in your browser(gpl.internetconnection.net)
gpl.internetconnection.net
Vi in JavaScript, in your browser
http://gpl.internetconnection.net/vi/
22 comments
This comment made me realize that I've been using emacs commands for textareas in Safari/Firefox without thinking about it. Most of them seem to be there, at least for moving around within the text. Does this just work under OS X?
A lot of them do "just work", and the rest can be made to. See http://www.hcs.harvard.edu/~jrus/site/Cocoa%20Text%20System.... for the full story, or create a ~/Library/KeyBindings/DefaultKeyBinding.dict file that contains something like:
{
"~d" = "deleteWordForward:";
"~f" = "moveWordForward:";
"~b" = "moveWordBackward:";
}
The "~" means "Meta"; all this does is set up M-d, M-f, M-b to work like they do in Emacs.I think this works everywhere. Being vim a modal editor is not possible to "hide" vim bindings :)
Nice, what is missing is a way to have vim (or a decent approximation) in every text area, embedded
This sounds like something OS X or another ambitious and slick operating system should provide: the ability to use the text editing engine of your choice in every textarea on your machine.
This sounds like something OS X or another ambitious and slick operating system should provide: the ability to use the text editing engine of your choice in every textarea on your machine.
Are there any other similar projects out there?
I was thinking about attempting a VIM plug-in for Bespin (https://bespin.mozilla.com/) that could also be used as an FCK/TinyMCE style textarea add-on.
I was thinking about attempting a VIM plug-in for Bespin (https://bespin.mozilla.com/) that could also be used as an FCK/TinyMCE style textarea add-on.
Wow, simply great. It would be nice to open files in your computer and use them. I could not open any file by
:n filename command. Also record command, which is very useful is missing. I am not sure for what this can be used?
It can be used for adding a vi mode to any web page editing scenario you might have a need for. If you want to edit local files from your browser, I've made a Firefox extension that does just that:
http://past.github.com/despin/
It doesn't have a vi mode (yet) and lots of other things, but I'd be interested to see if people found it interesting and useful.
http://past.github.com/despin/
It doesn't have a vi mode (yet) and lots of other things, but I'd be interested to see if people found it interesting and useful.
As a VIM user, these things irritated me:
1) I cannot delete the end of a line with this thing. Is that normal? Im only used to VIM so this might be a VI thing.
2) CLTR+ does not scale up the font size
1) I cannot delete the end of a line with this thing. Is that normal? Im only used to VIM so this might be a VI thing.
2) CLTR+ does not scale up the font size
> Is that normal?
Yes. You're not "meant" to be able to backspace over content that wasn't added in your current transaction. Which is really inconvenient, because if you delete things when you're in command mode then it overwrites what's in your buffer, which is often convenient.
In vim you can simulate this by doing
Yes. You're not "meant" to be able to backspace over content that wasn't added in your current transaction. Which is really inconvenient, because if you delete things when you're in command mode then it overwrites what's in your buffer, which is often convenient.
In vim you can simulate this by doing
:set compatibleIt crashed on me (or rather, became totally unresponsive) when I deleted the whole buffer with a "dG" command.
running iceweasel 3.0.6
running iceweasel 3.0.6
I hope that this was done with a C compiler that can target Javascript!
Good job, now learn a real language.
Anime image macros! Yes!
I think HN is finally mainstream.
I think HN is finally mainstream.
While I'm at it, another thing I miss so much is the ability to tell Firefox (or other browsers) that I write in two languages (Italian and English) so it could automagically switch spell correction dictionary auto sensing the language. This problem is common to at least half the people living in Europe.