Skip to content

replit/codemirror-emacs

Repository files navigation

Emacs keybindings for CM6

Run on Replit badge NPM version badge

Installation

npm i @replit/codemirror-emacs

Usage

import { basicSetup, EditorView } from 'codemirror';
import { emacs } from "@replit/codemirror-emacs"

new EditorView({
  doc: "",
  extensions: [
    // make sure emacs is included before other keymaps
    emacs(), 
    // include the default keymap and all other keymaps you want to use in insert mode
    basicSetup, 
  ],
  parent: document.querySelector('#editor'),
})