npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

monaco-helix

v0.1.0

Published

Selection-first Helix keybindings for the Monaco editor

Readme

monaco-helix

Helix-style, selection-first modal editing for Monaco Editor.

monaco-helix adds Normal, Insert, and Select modes to an existing Monaco editor. It is a standalone TypeScript ESM package with no framework dependency. Monaco Editor ^0.55.1 is a peer dependency supplied by your application.

The controller and selection helpers are adapted from zixiao-labs/logos at commit 69e08e1, under the MIT License. See third-party notices and the implementation review for provenance and changes.

Features

  • Selection-first editing with Normal, Insert, and Select modes.
  • Motions, counts, character finds, text objects, and multiple selections.
  • Delete, change, yank, paste, registers, surrounds, and selection merging.
  • Configurable mode keymaps, nested prefixes, command sequences, and TOML imports.
  • Worker-based regex search with live previews, history, and cancellation.
  • Macro recording and playback, including committed text and prompt responses.
  • Jump history and host adapters for file, buffer, symbol, and workbench commands.
  • Optional Tree-sitter Worker for Python, C++, and TypeScript syntax objects.
  • Unicode grapheme-aware movement and selection helpers.
  • Undo/redo, repeat insertion, and read-only editor support.
  • Optional mode status element, built-in prompts, mode events, and host commands.
  • Disposal and model lifecycle handling for applications that switch editors.

This is a browser implementation of a subset of Helix behavior. File access, saving, workbench commands, and editor layouts belong to the host application. Helix themes, plugins, shell pipelines, and terminal behavior are outside this package. See the supported keymap.

Install

Install the npm package together with Monaco:

npm install monaco-helix monaco-editor@^0.55.1

You can also install the source directly from GitHub:

npm install github:seo-rii/monaco-helix monaco-editor@^0.55.1

The GitHub install runs the package's prepare build. For local development, clone the repository, run npm ci and npm run build, then install its path in your application:

npm install /absolute/path/to/monaco-helix monaco-editor@^0.55.1

Usage

This package runs in the browser. In an SSR application, dynamically import Monaco and monaco-helix inside the client or mounted lifecycle before creating the editor and binding.

Create and configure Monaco as usual, including its workers and language services. Then attach Helix mode:

import * as monaco from 'monaco-editor';
import { initHelixMode } from 'monaco-helix';
import 'monaco-helix/style.css';

const editor = monaco.editor.create(document.getElementById('editor')!, {
  value: 'const message = "hello";\n',
  language: 'typescript',
});

const helix = initHelixMode(editor, document.getElementById('mode') ?? undefined, {
  onModeChange(mode) {
    console.log(mode);
  },
  onCommand(command) {
    // Handle application-specific commands such as :w in your host app.
    console.log('Host command:', command);
  },
  onError(error) {
    console.error(error);
  },
});

The editor starts in Normal mode. Press i to type, Esc to return to Normal, and v to extend selections. For example, ec selects to the end of the word and enters Insert mode to replace it; xd selects a line and deletes it.

Import monaco-helix/style.css for the cursor, status, and prompt presentation. If you omit the status element, the extension creates a status overlay inside the editor. A supplied element keeps its existing content; the extension adds and later removes its own child.

Attach one Helix instance per editor. Dispose it when switching to another keymap. Attaching again to the same editor disposes its previous binding. The extension does not create or dispose your Monaco models.

During view teardown, dispose the binding before the editor:

helix.dispose();
editor.dispose();

API

initHelixMode(editor, statusElement?, options?) returns a HelixBinding. The package exports the HelixBinding, HelixOptions, and HelixMode types. HelixMode is 'normal' | 'insert' | 'select'.

| Argument | Description | | --- | --- | | editor | A Monaco IStandaloneCodeEditor instance | | statusElement | Optional existing element for the current mode and pending keys; omit or pass undefined for the default overlay | | options.onModeChange | Callback receiving the initial HelixMode, later changes, and model resets | | options.onCommand | Host command callback: (command: string) => void \| Promise<void> | | options.onError | Error callback: (error: Error) => void | | options.shouldHandleKey | Return false to preserve an application shortcut | | options.clipboard | Supply an alternative asynchronous clipboard adapter | | options.keymap | Override bindings in Normal, Insert, and Select modes | | options.chordTimeoutMs | Flush an incomplete Insert shortcut after this delay (default 500 ms) | | options.search | Configure Worker searches, limits, and time budgets | | options.host | Supply file, buffer, symbol, location, and application command capabilities | | options.navigation | Bound jump history and picker result counts | | options.syntaxProvider | Supply optional syntax objects and structured navigation |

The returned handle exposes:

| Member | Description | | --- | --- | | getMode() | Read the current mode | | execute(command, args?) | Run a registered command and await completion | | listCommands() | Discover supported command IDs and descriptions | | feedKeys(keys) | Play logical Helix key notation through the active keymap | | setKeymap(keymap) | Atomically replace user overrides; returns diagnostics | | cancel() | Cancel pending work, prefixes, and prompts | | macros | Record, inspect, import, and replay macros through the binding's MacroEngine | | onDidChangeMode(listener) | Subscribe to future mode notifications; returns a disposable subscription | | dispose() | Remove the extension's listeners, decorations, and UI |

Numeric colon commands such as :42 go to that line. Other colon commands are passed to onCommand without the leading colon for your application to handle. Saving, closing files, and buffer switching depend on your host application. Monaco language-service commands depend on providers registered by that application. Clipboard operations use the supplied adapter or the browser's clipboard API.

Registers, completed macros, search history, and jump history belong to each binding, so separate editors do not share them. They remain available when that editor changes models; editing mode, unfinished recording, and pending work reset for the new model.

Insert mode uses Monaco's normal input, completion, and composition handling. Normal and Select modes consume ordinary text keys to prevent accidental insertion. Browser and operating-system shortcuts can still take precedence.

Read the feature guides for configuration, integration, and limits:

Development

npm ci
npx playwright install chromium
npm run check
npm run dev

See CONTRIBUTING.md for focused test commands and contribution guidelines. Report reproducible problems through GitHub Issues.

License

MIT. Copyright © 2026 Seohyun Lee and Zixiao Laboratories.