vimee ghost mascot
Try the demo!

vimee

Headless Vim Engine for the Web

Pure functions. Zero dependencies. Any framework.

What is vimee?

A headless Vim engine that runs anywhere JavaScript does.

f(x)

Pure Functions

Give it a keystroke and state, get back new state and actions. No side effects, no DOM, no surprises.

Zero Dependencies

Pure TypeScript. No runtime baggage. The core engine is just 2.8kB gzipped.

</>

Any Framework

React, Vue, Svelte, vanilla JS — bindings are thin wrappers over the pure engine.

Live Demo

A real Vim editor. Right here in the browser.

Features

Everything you expect from Vim, in a pure JavaScript engine.

N I V

Six Editing Modes

Normal, Insert, Visual, Visual-Line, Visual-Block, and Command-Line — all faithfully implemented.

hjkl

Rich Motions

h j k l w b e 0 $ ^ gg G f F t T — navigate with the full Vim vocabulary.

3dd

Operators & Counts

d y c > < combined with motions, text objects, and counts. 3dd, 2dw, ci" — it just works.

iw

Text Objects

iw aw i" a" i( a( i[ a[ i{ a{ — select and operate on semantic chunks of text.

/

Search & Replace

/pattern n N for searching, :s/old/new/g for replacing. Full regex support.

q@

Macros & Marks

q{a-z} to record, @{a-z} to play. m{a-z} to mark, '{a-z} to jump. Automate everything.

Architecture

One pure function. No side effects. No surprises.

Input

keystroke state

Processor

processKeystroke()

Output

newState VimAction[]

VimAction types

cursor-move content-change mode-change yank save status-message scroll

No DOM Access

The engine never touches the DOM.

No Side Effects

Pure in, pure out. Every time.

Fully Testable

Unit test every keystroke.

Framework Agnostic

Works everywhere JS runs.

Packages

A modular ecosystem. Use only what you need.

@vimee/core

Headless Vim engine. Zero dependencies, framework agnostic. The pure-function core that powers everything.

npm install @vimee/core

@vimee/react

React hooks for Vim. useVim() returns content, cursor, mode, and a key handler. Thin reactive wrapper.

npm install @vimee/react

@vimee/shiki-editor

Drop-in code editor with Shiki syntax highlighting. One component, full Vim experience.

npm install @vimee/shiki-editor

@vimee/plugin-textarea

Vim mode for any textarea. attach() and go. Works with vanilla JS, shadcn/ui, or anything.

npm install @vimee/plugin-textarea

Quick Start

Install. Import. Done. Just a few lines.

1
Install
npm install @vimee/core @vimee/react @vimee/shiki-editor shiki
2
Build your editor

That's it. A full Vim editor in a few lines.

Community

vimee is open source. Join us.