top | item 6899072

Vim.js - JavaScript port of Vim

199 points| sebg | 12 years ago |coolwanglu.github.io

100 comments

order
[+] mqzaidi|12 years ago|reply
Rule 34 for software: If it exists, there IS a javascript port of it.
[+] vezzy-fnord|12 years ago|reply
Even more true now that Emscripten and asm.js exist.
[+] saosebastiao|12 years ago|reply
I'm normally unimpressed by applications ported to javascript. However, this actually has me excited. I would love to be able to edit all my Dropbox text files with a web interface. If anyone here works for Dropbox, I beg you to integrate this!
[+] bilalq|12 years ago|reply
Really cool! It even supported doing things like:

    inoremap jj <Esc>`^
Backspace ended up triggering the browser's back action though. Other than that, this is really nice.

Edit: After looking at the source, this seems to make use of emscripten to reuse Vim's existing source code. This really makes me wonder what other cool things we can bring over to the client side.

[+] chrismorgan|12 years ago|reply
… There are still browsers that use backspace for navigation?

(I'm a little surprised by this because I've seen so many complaints about it leading to data loss.)

[+] IgorPartola|12 years ago|reply
This... Plus Gmail... Man that's fantastic. I have sent an embarrassing number of emails that end with :wq.

Once you try Vim, it's really hard to go back. I also tried using mutt instead of GMail, and while it gets me 90% of the way there, the lack of graphical preview of attachments and things like filters and HelloSign make GMails web interface more useful.

[+] finnh|12 years ago|reply
There are browser plugins that let you edit <textarea> elements in your $EDITOR.

I use "It's all text!" in Firefox for this purpose and it works well; the workflow is pretty simple: focus in textarea, hotkey to switch to vim, save & close buffer to switch back to the browser. (not affiliated, just a user).

You do of course lose rich text formatting.

[+] yogo|12 years ago|reply
Yep, I constantly have to delete jj at the end of emails. The cool thing about this port is that mapping seems to work. Naturally the first thing I tried was :inoremap jj <esc>, which I don't think works in codemirror + vim plugin.
[+] squigs25|12 years ago|reply
Who uses :wq when you can use :x?
[+] gnur|12 years ago|reply
All the three letter motions I tried don't work. Without them this is more vi then vim. caw ci" ca( all don't work.
[+] justinmk|12 years ago|reply
It is built with the compiler flag: --with-features=tiny.
[+] imslavko|12 years ago|reply
For Vimium users: don't forget to enter the insert mode in your browser first ;)
[+] xcyu|12 years ago|reply
This is pretty cool. Backspace not working for me though in Chrome.
[+] bromagosa|12 years ago|reply
Same here, Chrome on Debian.

Backspace and ESC not working, so after I enter a mode I'm stuck in it forever.

[+] Aqueous|12 years ago|reply
did you port ncurses using emscripten? This could enable bringing a large portion of GNU over to the browser as a cloud-based app. Stallman's nightmare, in other words.
[+] jay-anderson|12 years ago|reply
It works amazingly well. However don't split windows then use ctrl-w j to switch. The browser captures ctrl-w first and closes the tab. Other ctrl-* combinations don't work probably for similar reasons.
[+] tikwidd|12 years ago|reply
Who wants to make a javascript emacs? you could call it emscriptenmacs..
[+] vidarh|12 years ago|reply
ymacs (Fabrice Bellards Emacs "clone") is installed in jslinux.
[+] JasonFruit|12 years ago|reply
I tried it, and now I'm confused and angry! Seems right to me.
[+] volaski|12 years ago|reply
Cool. Now go build NERDTree and Ctrl-P and come back. Then I will use it
[+] jbeja|12 years ago|reply
You still use those?
[+] lorenzfx|12 years ago|reply
I really hope someone will patch it into the IPython notebook (or at least enable the codemirror vim keybindings). If I can find the time to learn some javascript I'll give it a go myself.
[+] siddboots|12 years ago|reply
Can anyone think of a sane way to make this integrate with github?
[+] ra3|12 years ago|reply
Lots of comments seem to expect some further web integration with various services but this looks like more of a prototype/proof-of-concept using emscripten.

Cool nonetheless.

[+] fhd2|12 years ago|reply
While this is impressive, I find it surprisingly slow compared to much more demanding applications with bigger code bases compiled via Emscripten. Any ideas why?
[+] pablovidal85|12 years ago|reply
Very slow (unusable) on a MacBook Air 1.4GHz 4GB RAM using Chromium 30.0.1589.0 (215899). I suppose it's the price of using an emscripten port.