

Vi in JavaScript, in your browser - mnemonik
http://gpl.internetconnection.net/vi/

======
antirez
Nice, what is missing is a way to have vim (or a decent approximation) in
every text area, embedded. There are different solutions and extensions but
nothing comparable to vim running in the text area box.

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.

~~~
nirmal
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?

~~~
epe
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....](http://www.hcs.harvard.edu/~jrus/site/Cocoa%20Text%20System.html)
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.

------
mhansen
It's not picking up escapes (Google Chrome 4.0.221.6)

~~~
Hates_
Same for me in Safari 4.0.3.

~~~
ams6110
CTRL-[ works as an alternative.

------
rudenoise
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.

------
MikeHawk
Not recommended for Vimpertator users. I just acciendentally quit my browser
session without knowing it.

~~~
gfodor
Hit ctrl-Z for pass through mode to use it.

~~~
MikeHawk
many thanks!

------
manish
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?

~~~
past
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.

------
yeahit
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

~~~
cturner
> 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

    
    
        :set compatible

------
mjgoins
It crashed on me (or rather, became totally unresponsive) when I deleted the
whole buffer with a "dG" command.

running iceweasel 3.0.6

------
stcredzero
I hope that this was done with a C compiler that can target Javascript!

------
afed
Good job, now learn a real language.

------
brazzy
<http://ui18.gamespot.com/2897/whywouldyoudothat_2.jpg>

~~~
jrockway
Anime image macros! Yes!

I think HN is finally mainstream.

