Skip to content
Open
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
16 changes: 16 additions & 0 deletions applications/vscode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*Move between groups when multiple groups are set up in the window*/
serenade.app("vscode").command("group <%direction%>", async (api, matches) => {
api.pressKey("k",["control"]);
api.pressKey(`${matches.direction}`,["control"]);
});

/*Insert a snippet (from VSCode or an extension) at the current position.
It can be edited using Serenade's "system" command. The first match in the list
of snippets is the snippet actually written in the document.*/
serenade.app("vscode").command("snippet <%name%>", async (api, matches) => {
api.evaluateInPlugin("editor.action.insertSnippet");
setTimeout(function() {
api.typeText(matches.name);
api.pressKey("enter");
}, 500);
});