rhysd /vim.wasm

Vim editor ported to WebAssembly

★ 5,651⑂ 149👁 74⑃ 10● 48▤ 13
Vim ScriptCreated 2018-07-01rhysd.github.io/vim.wasm
Download: v0.0.13wasm-0.0.13 ↓0.0.132019-12-30
+1
Daily
5,651
stars
149
forks
74
watchers
10
prs
48
issues
13
releases

README

vim.wasm: Vim Ported to WebAssembly
================================================================================
[![Build Status][travis-ci-badge]][travis-ci]
[![npm version][npm-badge]][npm-package]

This project is an experimental fork of [Vim editor][] by [@rhysd][] to compile
it into [WebAssembly][] using [emscripten][] and [binaryen][].  Vim runs on [Web Worker][]
and interacts with the main thread via [SharedArrayBuffer][shared-array-buffer].

The goal of this project is running Vim editor on browsers without losing Vim's powerful
functionalities by compiling Vim C sources into WebAssembly.



 [Try it with your browser][try it]

- USAGE
  - Almost all Vim's powerful features (syntax highlighting, Vim script, text objects,
    ...) including the latest features (popup window, ...) are supported.
  - Drag&Drop files to browser tab opens them in Vim.
  - :write only writes file on memory.  Download current buffer by :export or
    specific file by :export {file}.
  - Clipboard register " is supported.  For example, paste system clipboard text
    to Vim with "p or :put , and copy text in Vim to system clipboard with
    "y or :yank .
    If you want to synchronize Vim's clipboard with system clipboard,
    :set clipboard=unnamed should work like normal Vim.
  - Files under ~/.vim directory is persistently stored in [Indexed DB][idb].
    Please write your favorite configuration in ~/.vim/vimrc (NOT ~/.vimrc).
  - file={filepath}={url} fetches a file from {url} to {filepath}.  Arbitrary
    remote files can be opened (care about CORS).
  - Default colorscheme is [onedark.vim][onedark], but [vim-monokai][monokai] is
    also available as high-contrast colorscheme.
  - :!/path/to/file.js evaluates the JavaScript code in browser.  :!% evaluates
    current buffer.
  - vimtutor is available by :e tutor.
  - Add arg= query parameters (e.g. ?arg=~%2f.vim%2fvimrc&arg=hello.txt) to
    add vim command line arguments.
  - Please read the usage documentation for more details.

- NOTICE
  - Please access from desktop Chrome, Firefox, Safari or Chromium based browsers
    since this project uses SharedArrayBuffer and Atomics.  On Firefox or Safari,
    feature flags (javascript.options.shared_memory for Firefox) must be enabled
    for now.
  - vim.wasm takes key inputs from DOM keydown event. Please disable your browser
    extensions which intercept key events (incognito mode would be the best).
  - This project is very early phase of experiment.  You may notice soon on
    trying it... it's buggy :)
  - If inputting something does not change anything, please try to click somewhere
    in the page.  Vim may have lost the focus.
  - Vim exits on :quit, but it does not close a browser tab. Please close it
    manually :)

This project is packaged as [vim-wasm npm pacakge][npm-package] to be used in
web application easily.  Please read the documentation for
more details.

The current ported Vim version is 8.2.0055 with 'normal' and 'small' features set

Top issues

Latest release

v0.0.13 wasm-0.0.13 2019-12-30
- Improve: Upstream Vim version was updated to v8.2.55
- Improve: Wasm binary is built with the latest emscripten v1.39.5
- Improve: Update npm dependencies

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON