No description, website, or topics provided.
C Vim script JavaScript IDL C++ Objective-C Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Collaborative Vim

This is an experiment that combines the Portable Native Client (PNaCl) with the JavaScript Drive Realtime API to enable collaborative editing in Vim. This app runs Vim natively in the browser and displays the UI with hterm, a JS terminal emulator.

The PNaCl and JS code communicate to keep the Realtime model of the document in sync with Vim's own file buffer. Realtime events from JS are passed to Vim and applied to the file. Local edits within Vim are passed to JS to edit the Realtime model.

This is not a Vim plugin. Arguably, a Vim plugin would not be sufficient for robust collaboration. Vim is able to handle asynchronous edit events due to modifications to its source.


From vim73/, run ./ After a successful build, run ./ install. There will be errors, see TODOs below. Finally, copy vim73/src/publish/ to web/vim_pnacl.pexe.


To run on your own domain or machine, first set up the Drive API for your project by following step 1 of Creating a Realtime Application. You will need to reassign the project ID's in web/vim_realtime.js.

The URL you launch the app from must be the same as the JavaScript Origins URL you specified when setting up the project OAuth token.

You can run a local web server with ./, but note you must use a DNS name to access your local machine. The Drive API doesn't recognize localhost as a valid origin.


Although this project is functional, there is a lot left to do! Check Issues if you want to contribute or to file a bug.