{"id":19373927,"url":"https://github.com/crendking/code-action-from-commands","last_synced_at":"2025-02-24T15:21:25.008Z","repository":{"id":246918940,"uuid":"824350643","full_name":"CrendKing/code-action-from-commands","owner":"CrendKing","description":"Create Code Action that executes sequence of commands.","archived":false,"fork":false,"pushed_at":"2024-11-04T01:41:02.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-07T02:17:15.561Z","etag":null,"topics":["code-action","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=crendking.code-action-from-commands","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CrendKing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-05T00:09:55.000Z","updated_at":"2024-11-02T08:28:07.000Z","dependencies_parsed_at":"2024-07-05T22:10:59.586Z","dependency_job_id":"b6adf6e0-80e9-42bc-9827-a0fc6f6c872a","html_url":"https://github.com/CrendKing/code-action-from-commands","commit_stats":null,"previous_names":["crendking/code-action-from-commands"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrendKing%2Fcode-action-from-commands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrendKing%2Fcode-action-from-commands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrendKing%2Fcode-action-from-commands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrendKing%2Fcode-action-from-commands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrendKing","download_url":"https://codeload.github.com/CrendKing/code-action-from-commands/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240501242,"owners_count":19811574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-action","vscode","vscode-extension"],"created_at":"2024-11-10T08:33:09.350Z","updated_at":"2025-02-24T15:21:24.981Z","avatar_url":"https://github.com/CrendKing.png","language":"TypeScript","readme":"Create Code Action that executes sequence of commands, customizable via configuration.\n\nUnlike the general, ubiquitous commands, [Code Action](https://code.visualstudio.com/docs/editor/refactoring) is a different kind of function that are more contextual to the specific content and language of the document.\n\nWhile you can't execute a Code Action from the [Command Palette](https://code.visualstudio.com/api/ux-guidelines/command-palette), one unique feature that's only available through Code Action is [Code Actions on Save](https://code.visualstudio.com/docs/typescript/typescript-refactoring#_code-actions-on-save). You can use it to execute a Code Action whenever a document is saved.\n\nWith this extension, you can create Code Action that executes sequence of commands. Then you can use it in the `editor.codeActionsOnSave` setting.\n\nOne way to know the ID of a command through the Command Palette is to click the gear icon to the right, then check the input box in the \"Keyboard Shortcuts\" page.\n\n### Example configuration\n\n```jsonc\n\"codeActionFromCommands.codeActions.definitions\": {\n    // Convert tab to spaces for ALL languages\n    \"tabToSpaces\": {\n        \"commands\": [\n            \"editor.action.indentationToSpaces\"\n        ]\n    },\n\n    // Preview the Markdown file on save\n    \"previewMarkdown\": {\n        \"commands\": [\n            \"markdown.showPreview\"\n        ],\n        \"languages\": [\"markdown\"]\n    },\n\n    // No-op due to empty \"languages\" array\n    \"memo\": {\n        \"commands\": [\n            \"workbench.action.editor.changeEOL\"\n        ],\n        \"languages\": []\n    }\n}\n\n// enable Code Actions on Save\n\"editor.codeActionsOnSave\": {\n    \"source.codeActionFromCommands.tabToSpaces\": \"always\",\n    \"source.codeActionFromCommands.previewMarkdown\": \"explicit\"\n}\n```\n\n### Attribution\n\nExtension icon: [Action figure icons created by Freepik - Flaticon](https://www.flaticon.com/free-icons/action-figure)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrendking%2Fcode-action-from-commands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrendking%2Fcode-action-from-commands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrendking%2Fcode-action-from-commands/lists"}