Skip to content

Commit d17c471

Browse files
committed
Revert "Enable Emacs keybindings in the CodeMirror editor"
This reverts commit c8f9b00.
1 parent c8f9b00 commit d17c471

4 files changed

Lines changed: 3 additions & 53 deletions

File tree

editors/codemirror/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ provides:
1111
WebAssembly by the [`algae-wasm`](../../algae-wasm) crate.
1212
- **Error reporting** — kernel diagnostics rendered as inline squiggles, gutter
1313
markers, and a results pane.
14-
- **Emacs keybindings** — the `@replit/codemirror-emacs` keymap (`C-a`/`C-e`,
15-
`C-k`, `C-w`/`M-w`/`C-y`, `C-s`/`C-r`, mark & kill-ring, …). `Ctrl-Enter` still
16-
runs the checker.
1714

1815
## Build
1916

editors/codemirror/package-lock.json

Lines changed: 1 addition & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editors/codemirror/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010
"build:dev": "esbuild src/index.js --bundle --format=esm --outfile=dist/algae-editor.js --sourcemap"
1111
},
1212
"dependencies": {
13-
"@codemirror/autocomplete": "^6.0.0",
1413
"@codemirror/commands": "^6.0.0",
1514
"@codemirror/language": "^6.0.0",
1615
"@codemirror/lint": "^6.0.0",
17-
"@codemirror/search": "^6.0.0",
1816
"@codemirror/state": "^6.0.0",
1917
"@codemirror/view": "^6.0.0",
20-
"@lezer/highlight": "^1.0.0",
21-
"@replit/codemirror-emacs": "^6.1.0"
18+
"@lezer/highlight": "^1.0.0"
2219
},
2320
"devDependencies": {
2421
"esbuild": "^0.24.0"

editors/codemirror/src/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
highlightActiveLineGutter, drawSelection, highlightSpecialChars,
1313
} from "@codemirror/view";
1414
import { history, defaultKeymap, historyKeymap, indentWithTab } from "@codemirror/commands";
15-
import { emacs } from "@replit/codemirror-emacs";
1615
import { bracketMatching } from "@codemirror/language";
1716
import { lintGutter, lintKeymap } from "@codemirror/lint";
1817
import { algae } from "./algae-lang.js";
@@ -153,14 +152,10 @@ export function mountAlgaeEditor(parent, opts = {}) {
153152
drawSelection(),
154153
highlightActiveLine(),
155154
bracketMatching(),
156-
// Ctrl-Enter / Cmd-Enter runs the checker (same as the Check button). Kept
157-
// ahead of the Emacs keymap so it always wins.
155+
// Ctrl-Enter / Cmd-Enter runs the checker (same as the Check button).
158156
keymap.of([
159157
{ key: "Mod-Enter", run: (v) => { doCheck(v); return true; } },
160158
]),
161-
// Emacs-style keybindings (C-a, C-e, C-k, C-w, M-w, C-y, C-s, …) plus the
162-
// mark/kill-ring behavior. Installs its own high-precedence keymap.
163-
emacs(),
164159
keymap.of([...defaultKeymap, ...historyKeymap, ...lintKeymap, indentWithTab]),
165160
algae(),
166161
baseTheme,

0 commit comments

Comments
 (0)