codeformat

This commit is contained in:
dtricks 2025-10-03 18:12:47 +02:00 committed by dtricks
parent be9368e8a2
commit 73a9834959
4 changed files with 32 additions and 29 deletions

View file

@ -13,7 +13,9 @@ const vscodePlugin = ViewPlugin.fromClass(
constructor() {}
},
{
provide : () => { return Prec.highest(keymap.of([...vscodeKeymap ])); },
provide: () => {
return Prec.highest(keymap.of([...vscodeKeymap]));
},
},
);
const vscodeExtension = (options) => [vscodePlugin].concat(options ?? []);
@ -73,9 +75,7 @@ try {
// :w to evaluate
// :w to evaluate
Vim.defineEx('write', 'w', (cm) => {
const view =
cm?.view ||
cm; // CM6 Vim passes either an object with view or the view itself
const view = cm?.view || cm; // CM6 Vim passes either an object with view or the view itself
try {
view?.focus?.();
// Let the app know this came from Vim :w

0
packages/osc/server.js Normal file → Executable file
View file

View file

@ -8,6 +8,7 @@ layout: ../../layouts/MainLayout.astro
When the REPL editor (CodeMirror) is configured to use Vim keybindings, the following commands are available:
- :w — Evaluate the current code
- Triggers the same evaluation as Ctrl+Enter / Alt+Enter
- Youll see messages in the Console panel such as:
- [vim] :w — evaluating code
@ -15,10 +16,12 @@ When the REPL editor (CodeMirror) is configured to use Vim keybindings, the foll
- [eval] code updated
- :q — Stop/pause playback
- Triggers the same stop action as Alt+.
- Useful to quickly stop scheduling without leaving Vim mode
- gc — Toggle line comments for the current selection(s)
- Works in normal and visual mode
- If theres a selection, all selected lines are toggled