Javascript Vi

Few would dispute that Vi was a great text editor in its day, but no one has done anything to bring it back until now. A company called Internet Connection has developed JSVI, a clone of Vi that was written in javascript and runs inside editable text areas on virtually any browser with javascript support.

It functions identically to Vi, offering ed/ex command support, vi-keys, unicode awareness, and a number of other features available on Vi. You can see a demo of JSVI here. If you prefer to run vi on your own page, download this javascript document. JSVI is open source, and we certainly agree with [Jason Striegel] that this would make a fitting addition to any Unix blog or forum.

emacs sucks.

[via Hackzine]

21 thoughts on “Javascript Vi

  1. Real nutcases (like me!) will apreciate the vimperator, an addon for firefox that brings Vi-joy to this browser (I switched from Epiphany to firefox so I can use it!)


    My first question was, how do I click links: well press ‘f’ (or ‘F’ to tab-open) and all links will be highlit and fitted with a number… just type the number!

  2. Made some small changes to make the colors right on every page and to hide the toolbar:

    — vi_orig.js 2008-05-06 21:31:01.000000000 +0200
    +++ vi.js 2008-07-07 11:08:39.000000000 +0200
    @@ -3643,6 +3643,7 @@ = ‘absolute’; = ‘none’;
    + = ‘#000000’;

    backing.tabIndex = -1; = ‘absolute’;
    @@ -3665,6 +3666,8 @@ = ‘absolute’; = ‘0px’; = ‘0px’;
    + = ‘#000000’;
    + = ‘hidden’;
    tools.innerHTML = ”
    + ‘<input tabindex=”-1″ type=”button” value=”B” style=”font-weight:bold;” onClick=”term_command(\’:F!b\’);” />’
    + ‘<input tabindex=”-1″ type=”button” value=”I” style=”font-style:italic;” onClick=”term_command(\’:F!i\’);” />’
    @@ -3697,6 +3700,9 @@ = ‘default’; = ‘monospace’; = ‘100%’;
    + = ‘#ffffff’;
    + = ‘#000000’;
    + = ‘left’;
    term._formelement = t; = ‘hidden’;

    After that i added two filters to my Proxomitron:

    “” => “

  3. its a good start for sure, I think I’ll go ahead and add more ‘vim’ functionality to it… most notably: syntax highlighting and its function and macro capabilities.

    it’d be an interesting task, but I love javascript, very powerful when used properly.

    oh, and an all javascript os wouldn’t really work, as running kernel level calls through an interpreter would run freakin awful… but I have started work on a fully scriptable and interactive javascript shell… started using spidermonkey, but may implement using v8 instead, as a shell would do the same things repeatedly for the most part, v8’s jit-style class compiler would be great for that.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s