top | item 4143863

Show HN: vi in your browser - edit files directly from Dropbox, etc

206 points| tagx | 13 years ago |mit.edu | reply

77 comments

order
[+] kjhughes|13 years ago|reply
Cool. Emacs fans wanting their fix in the browser can checkout ymacs:

http://www.ymacs.org/demo/

[+] grandalf|13 years ago|reply
Does ymacs open files from Dropbox yet? Github, if you're reading this please make both vi and emacs interfaces available through your web ui :)
[+] TeMPOraL|13 years ago|reply
Dammit Chrome, Y U capture C-n ? :(.
[+] mmahemoff|13 years ago|reply
Here's what I really, really, want:

$('textarea').vim()

[+] dimatura|13 years ago|reply
You can get something similar to that with the Firefox vimperator plugin. Press ctrl-I in a textarea and a vim pops up. When you close it the text gets copied back. I use it a lot!
[+] unknown|13 years ago|reply

[deleted]

[+] DanBC|13 years ago|reply
Thank you for this. Many people will remember early browsers were also editors; Mosaic and Nexus (or confusingly WorldWideWeb as its earlier name) both had document editing features.
[+] davidandgoliath|13 years ago|reply
Yum. Though the biggest thing I liked about this was learning about the service 'filepicker'. Smart integration.
[+] tagx|13 years ago|reply
Thanks! Filepicker was a joy to use and really made this
[+] sbmassey|13 years ago|reply
Pretty darn nifty, but vim stuff like 'ciw' doesn't work, and also 'C' leaves you in an insert state where your next keystrokes are entered just before the last letter in the line, rather than after the last letter in the line.
[+] tagx|13 years ago|reply
I just fixed C. ciw doesn't work since I've only implemented vim stuff for now but I may slowly add in vim features if there is demand for them
[+] wetmore|13 years ago|reply
Yeah that was literally the first thing I tried, and I was disappointed it didn't exist.
[+] udp|13 years ago|reply
Has anyone tried compiling the real vi/vim with Emscripten?
[+] filipncs|13 years ago|reply
Somehow online vi clones never bother with implementing ^[ (does the same as escape), which seriously impairs me.

Is this impossible to implement?

[+] a3_nm|13 years ago|reply
Same for ^C, which also does the same as Esc and is extremely convenient to type. (There is a slight difference with Esc though: VjjIblah^C does not do the same as VjjIblah<Esc>.)
[+] tagx|13 years ago|reply
This is implemented. It works for me in chrome
[+] s00pcan|13 years ago|reply
I always get confused when I run apps like this and they don't work initially. If you use Vimium, press i when this starts up.
[+] taylorbuley|13 years ago|reply
This appears to be completely static, which is awesome (no server-side required for oAuth thanks to filepicker.io?)
[+] tagx|13 years ago|reply
It is completely static. I can do everything purely from javascript using filepicker.io to do all the I/O
[+] jlgreco|13 years ago|reply
Slight issue: counts do not work in combination with insertion commands. (in other words, you can't use 5i to have something inserted 5 times, or for a more useful example you cannot use 5o or 5O)

It's an easy to overlook, for a long time BusyBox's vi didn't like combining counts with o/O either.

[+] carb|13 years ago|reply
As well, non of the screen movement commands and some miscellaneous commands aren't working. It really took out almost all of the flow I have when I'm editing files.

Vi commands: ^D ^E ^B . J and probably more that I haven't tried.

Possibly Vim commands: * #

U is functioning completely incorrectly. Try dd, U on line 3 in the example.

It also wasn't allowing me to hit <ESC> (OSX 10.6, Chrome 19)

(All this isn't Filepicker's fault. It's whomever's that wrote the choppy JS version of Vi. But if you want to show off Vi in the browser, you can't make me feel like a broken machine when I try to use it.)

[+] mmahemoff|13 years ago|reply
Why I can't use this:

"This app will have access to your entire Dropbox."

Which still happens with pretty much every Dropbox app, despite fine-grained permissions many months ago. Dropbox, love the app, but the company needs a strong developer relations programme to get messages like this out.

[+] tagx|13 years ago|reply
Is there any other way to get an arbitrary file from your dropbox into a text editor?
[+] brettcvz|13 years ago|reply
Aah MIT nerds. Pretty cool though - any plans for Github support?
[+] tagx|13 years ago|reply
There already is Github support
[+] Ives|13 years ago|reply
Strike this. My bad.

(Original: First thing I tried: dG to delete everything, didn't work. So, it still needs improvement. Now, I'll admin I'm not 100% sure if G is a vim command or a vi one.)

[+] minikomi|13 years ago|reply
I'm having trouble with this too.. Deleting everything causes

    file[cursory+base]; 
to return undefined, and any calls to it e.g. as xx..

    2171
    _calcy(gg, xx.substr(zleft, xx.length-zleft), xg.substr(zleft, xg.length-zleft));
Will give errors.

    Uncaught TypeError: Cannot read property 'length' of undefined 
Chrome 19.0.1084.56 on Windows.

If I leave the first line alone, it appears to work great!

[+] brettcvz|13 years ago|reply
dG works for me
[+] jaggederest|13 years ago|reply
Funny story, the early version of Heroku was an in-browser editor, roundabout October '07. They're vim guys - but it didn't feel much like vim.
[+] sunils34|13 years ago|reply
Cool! You should add ctrl+c mapping to <ESC>. Thats how I switch out of modes so that I don't move my left hand out of position.
[+] cheeze|13 years ago|reply
Re map your caps lock to esc. How often do you use that stupid button anyways?
[+] ldh|13 years ago|reply
I'm not sure it would be such a good idea to implement a hodgepodge of random peoples' mappings.
[+] mise|13 years ago|reply
Nice!

Too much vim in my browser at once. Vimium didn't like interacting with the window, and interpreted my typing with a back-button action.

[+] danneu|13 years ago|reply
Pentadactyl (Firefox) has a "Pass Through" mode (ctrl-z) for this reason.