Skip to content

Commit

Permalink
Merge pull request #529 from coq-community/enhance/key-bindings
Browse files Browse the repository at this point in the history
Changed the command names to correspond to vscoq1
  • Loading branch information
rtetley authored Aug 1, 2023
2 parents 826fdb7 + 5b8d0be commit eaa76df
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 48 deletions.
84 changes: 42 additions & 42 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,82 +188,82 @@
],
"commands": [
{
"command": "vscoq.displayGoals",
"command": "extension.coq.displayGoals",
"category": "Coq",
"title": "Display Goals",
"description": "Displays the goal view"
},
{
"command": "vscoq.searchCursor",
"command": "extension.coq.query.search",
"category": "Coq",
"title": "Search on cursor",
"description": "Launches a search query for the word under the cursor"
"title": "Search",
"description": "Search for the term pattern at the cursor"
},
{
"command": "vscoq.aboutCursor",
"command": "extension.coq.query.about",
"category": "Coq",
"title": "About on cursor",
"description": "Launches an about query for the word under the cursor"
"title": "About",
"description": "About the term pattern at the cursor"
},
{
"command": "vscoq.checkCursor",
"command": "extension.coq.query.check",
"category": "Coq",
"title": "Check on cursor",
"description": "Launches a check query for the word under the cursor"
"title": "Check",
"description": "Check the type of term at the cursor"
},
{
"command": "vscoq.locateCursor",
"title": "Locate on cursor",
"description": "Launches a locate query for the word under the cursor",
"command": "extension.coq.query.locate",
"title": "Locate",
"description": "Locate the term at the cursor",
"category": "Coq"
},
{
"command": "vscoq.printCursor",
"title": "Print on cursor",
"description": "Launches a print query for the word under the cursor",
"command": "extension.coq.query.print",
"title": "Print",
"description": "Print the definition of the term at the cursor",
"category": "Coq"
},
{
"command": "vscoq.interpretToPoint",
"command": "extension.coq.interpretToPoint",
"category": "Coq",
"title": "Interpret file to point",
"title": "Interpret to point",
"description": "Interprets the current coq file until the given point"
},
{
"command": "vscoq.interpretToEnd",
"command": "extension.coq.interpretToEnd",
"category": "Coq",
"title": "Interpret file to end",
"title": "Interpret to end",
"description": "Interprets the current coq file until the end"
},
{
"command": "vscoq.stepForward",
"command": "extension.coq.stepForward",
"title": "Step Forward",
"category": "Coq"
},
{
"command": "vscoq.stepBackward",
"command": "extension.coq.stepBackward",
"title": "Step Backward",
"category": "Coq"
},
{
"command": "vscoq.documentState",
"command": "extension.coq.documentState",
"title": "Get Document State",
"category": "Coq"
},
{
"command": "vscoq.addQueryTab",
"command": "extension.coq.addQueryTab",
"title": "Add Tab",
"category": "Coq",
"icon": "$(add)"
},
{
"command": "vscoq.collapseAllQueries",
"command": "extension.coq.collapseAllQueries",
"title": "Collapse All",
"category": "Coq",
"icon": "$(collapse-all)"
},
{
"command": "vscoq.expandAllQueries",
"command": "extension.coq.expandAllQueries",
"title": "Expand All",
"category": "Coq",
"icon": "$(expand-all)"
Expand All @@ -272,17 +272,17 @@
"menus": {
"view/title": [
{
"command": "vscoq.addQueryTab",
"command": "extension.coq.addQueryTab",
"group": "navigation",
"when": "view == vscoq.search"
},
{
"command": "vscoq.collapseAllQueries",
"command": "extension.coq.collapseAllQueries",
"group": "navigation",
"when": "view == vscoq.search && vscoq.expandedQueries"
},
{
"command": "vscoq.expandAllQueries",
"command": "extension.coq.expandAllQueries",
"group": "navigation",
"when": "view == vscoq.search && !vscoq.expandedQueries"
}
Expand All @@ -292,79 +292,79 @@
{
"key": "alt+down",
"mac": "ctrl+alt+down",
"command": "vscoq.stepForward",
"command": "extension.coq.stepForward",
"when": "editorTextFocus && editorLangId == coq"
},
{
"key": "alt+down",
"mac": "ctrl+alt+down",
"command": "vscoq.stepForward",
"command": "extension.coq.stepForward",
"when": "resourceScheme==coq-view"
},
{
"key": "alt+up",
"mac": "ctrl+alt+up",
"command": "vscoq.stepBackward",
"command": "extension.coq.stepBackward",
"when": "editorTextFocus && editorLangId == coq"
},
{
"key": "alt+up",
"mac": "ctrl+alt+up",
"command": "vscoq.stepBackward",
"command": "extension.coq.stepBackward",
"when": "resourceScheme==coq-view"
},
{
"key": "alt+right",
"mac": "ctrl+alt+right",
"command": "vscoq.interpretToPoint",
"command": "extension.coq.interpretToPoint",
"when": "editorTextFocus && editorLangId == coq"
},
{
"key": "alt+right",
"mac": "ctrl+alt+right",
"command": "vscoq.interpretToPoint",
"command": "extension.coq.interpretToPoint",
"when": "resourceScheme==coq-view"
},
{
"key": "alt+end",
"mac": "ctrl+alt+end",
"command": "vscoq.interpretToEnd",
"command": "extension.coq.interpretToEnd",
"when": "editorTextFocus && editorLangId == coq"
},
{
"key": "alt+end",
"mac": "ctrl+alt+end",
"command": "vscoq.interpretToEnd",
"command": "extension.coq.interpretToEnd",
"when": "resourceScheme==coq-view"
},
{
"key": "ctrl+alt+a",
"mac": "cmd+ctrl+a",
"command": "vscoq.aboutCursor",
"command": "extension.coq.query.about",
"when": "editorTextFocus && editorLangId == coq"
},
{
"key": "ctrl+alt+k",
"mac": "cmd+ctrl+k",
"command": "vscoq.searchCursor",
"command": "extension.coq.query.search",
"when": "editorTextFocus && editorLangId == coq"
},
{
"key": "ctrl+alt+c",
"mac": "cmd+ctrl+c",
"command": "vscoq.checkCursor",
"command": "extension.coq.query.check",
"when": "editorTextFocus && editorLangId == coq"
},
{
"key": "ctrl+alt+l",
"mac": "cmd+ctrl+l",
"command": "vscoq.locateCursor",
"command": "extension.coq.query.locate",
"when": "editorTextFocus && editorLangId == coq"
},
{
"key": "ctrl+alt+p",
"mac": "cmd+ctrl+p",
"command": "vscoq.printCursor",
"command": "extension.coq.query.print",
"when": "editorTextFocus && editorLangId == coq"
}
],
Expand Down
12 changes: 6 additions & 6 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let client: Client;
export function activate(context: ExtensionContext) {

function registerVscoqTextCommand(command: string, callback: (textEditor: TextEditor, ...args: any[]) => void) {
context.subscriptions.push(commands.registerTextEditorCommand('vscoq.' + command, callback));
context.subscriptions.push(commands.registerTextEditorCommand('extension.coq.' + command, callback));
};

const config = workspace.getConfiguration('vscoq');
Expand Down Expand Up @@ -82,11 +82,11 @@ export function activate(context: ExtensionContext) {
searchProvider.launchQuery(queryText, type);
};

registerVscoqTextCommand('searchCursor', (editor) => launchQuery(editor, "search"));
registerVscoqTextCommand('aboutCursor', (editor) => launchQuery(editor, "about"));
registerVscoqTextCommand('checkCursor', (editor) => launchQuery(editor, "check"));
registerVscoqTextCommand('locateCursor', (editor) => launchQuery(editor, "locate"));
registerVscoqTextCommand('printCursor', (editor) => launchQuery(editor, "print"));
registerVscoqTextCommand('query.search', (editor) => launchQuery(editor, "search"));
registerVscoqTextCommand('query.about', (editor) => launchQuery(editor, "about"));
registerVscoqTextCommand('query.check', (editor) => launchQuery(editor, "check"));
registerVscoqTextCommand('query.locate', (editor) => launchQuery(editor, "locate"));
registerVscoqTextCommand('query.print', (editor) => launchQuery(editor, "print"));
registerVscoqTextCommand('addQueryTab', () => searchProvider.addTab());
registerVscoqTextCommand('collapseAllQueries', () => searchProvider.collapseAll());
registerVscoqTextCommand('expandAllQueries', () => searchProvider.expandAll());
Expand Down

0 comments on commit eaa76df

Please sign in to comment.