From b7fabe17b8b9c933854f5fda31b3c64d1957318e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Mon, 11 Dec 2023 15:57:20 +0700 Subject: [PATCH] Expose Vim editor extension object for user scripting --- assets/js/hooks/cell_editor/live_editor.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/js/hooks/cell_editor/live_editor.js b/assets/js/hooks/cell_editor/live_editor.js index dd171d088f8..496d4ac67c8 100644 --- a/assets/js/hooks/cell_editor/live_editor.js +++ b/assets/js/hooks/cell_editor/live_editor.js @@ -8,9 +8,12 @@ import RemoteUser from "./live_editor/remote_user"; import { replacedSuffixLength } from "../../lib/text_utils"; import { settingsStore } from "../../lib/settings"; import Doctest from "./live_editor/doctest"; -import { initVimMode } from "monaco-vim"; +import { initVimMode, VimMode } from "monaco-vim"; import { EmacsExtension, unregisterKey } from "monaco-emacs"; +// Expose the Vim extension for customization +window.unstable_monacoExtensions = { VimMode }; + /** * Mounts cell source editor with real-time collaboration mechanism. */