Socket
Socket
Sign inDemoInstall

codemirror-helix

Package Overview
Dependencies
11
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    codemirror-helix

Helix bindings for CodeMirror


Version published
Weekly downloads
12
decreased by-42.86%
Maintainers
1
Install size
105 kB
Created
Weekly downloads
 

Readme

Source

codemirror-helix

A Codemirror plugin for Helix keybindings and general UX.

Installation

npm install codemirror-helix

How to

import { EditorView } from "@codemirror/view";
import { helix, commandFacet } from "codemirror-helix";

const customCommands = commandFacet.of([
  {
    name: "save",
    aliases: ["s", "sv"],
    help: "Save the document to the cloud",
    handler(view, args) {
      saveDocumentToCloud(view.state.doc.toString());
    },
  },
]);

const view = new EditorView({
  doc: "",
  extensions: [helix(), customCommands],
  parent: document.querySelector("#editor"),
});

License

Mozilla Public License 2.0

Keywords

FAQs

Last updated on 20 May 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc