Live data from Hacker News

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

mit.edu

81–82 of 82 posts

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

#81
post #65

Earlier quoted context omitted.

This is implemented. It works for me in chrome

You're right, thank you. At least it works on chrome on osx. It didn't work when I tested it earlier in dev channel chrome on windows.

Just in case you're still scanning the comments:

It works on OSX because it appears the operating system automatically creates a keypress of scancode 27 (escape) when you press "^[".

The special code in term_keypress_inner to handle this combination of keys is never hit, because no keypress event is created for ^[, but it isn't necessary on OSX due to the above feature.

You could expand your handling of keyup/keydown to handle it. For example, change your keyup handler to the following:

$(document).keyup(function(e) { if(e.keyCode === 27 || (e.ctrlKey && e.keyCode === 219)) { do_escape(); } });

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

#82
post #79

Earlier quoted context omitted.

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!

that is one of the best things in pentadactyl as well. unfortunately it still tries to use gvim for me. but this can surely be changed somehow.

set editor=(command line here), if you were curious. I've found you can easily check if an option for something exists by using :set and its nice autocompletion.
Post reply on HN