Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vim Mode and Read Only Fixes #1240

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"watch-web": "deno run -A --check build_web.ts --watch",
"watch-server": "deno run -A --unstable-kv --unstable-worker-options --check --watch silverbullet.ts",
"watch-plugs": "deno run -A --check build_plugs.ts -w",
"watch-all": "deno task watch-web & deno task watch-server & deno task watch-plugs",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with adding this, but then let's add deno task watch-server at the end so you can pass it arguments (like a folder), for instance deno task watch-all ~/tmp


"bundle": "deno run -A build_bundle.ts",

Expand Down
3 changes: 2 additions & 1 deletion web/editor_ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export class MainUI {
return;
}
console.log("Delegated keydown", ev, "to editor");
client.focus();
if (runScopeHandlers(client.editorView, ev, "editor")) {
ev.preventDefault();
}
Expand Down Expand Up @@ -154,6 +153,8 @@ export class MainUI {
client.focus();
}
});
} else {
setTimeout(() => client.focus());
}
}}
commands={client.getCommandsByContext(viewState)}
Expand Down
1 change: 1 addition & 0 deletions web/syscalls/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ export function editorSyscalls(client: Client): SysCallMapping {
key,
value,
});
client.reloadPage();
},
"editor.vimEx": (_ctx, exCommand: string) => {
const cm = vimGetCm(client.editorView)!;
Expand Down