{"id":13596884,"url":"https://github.com/usernamehw/vscode-commands","last_synced_at":"2025-04-06T22:11:46.008Z","repository":{"id":40656002,"uuid":"362811739","full_name":"usernamehw/vscode-commands","owner":"usernamehw","description":"VSCode extension to run commands from Tree View / Status Bar / Quick Pick.","archived":false,"fork":false,"pushed_at":"2025-03-15T21:10:38.000Z","size":2875,"stargazers_count":75,"open_issues_count":7,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T21:09:45.447Z","etag":null,"topics":["command","run","sequence","status-bar","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=usernamehw.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/usernamehw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2021-04-29T12:35:23.000Z","updated_at":"2025-03-28T13:52:43.000Z","dependencies_parsed_at":"2024-08-01T16:42:32.480Z","dependency_job_id":"54f49215-c0c3-4563-aba7-d9b3a0f0c515","html_url":"https://github.com/usernamehw/vscode-commands","commit_stats":{"total_commits":414,"total_committers":7,"mean_commits":"59.142857142857146","dds":"0.036231884057971064","last_synced_commit":"fea7d56b40a108c8af8c773fa3f467772e3743d7"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernamehw%2Fvscode-commands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernamehw%2Fvscode-commands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernamehw%2Fvscode-commands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernamehw%2Fvscode-commands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usernamehw","download_url":"https://codeload.github.com/usernamehw/vscode-commands/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557768,"owners_count":20958047,"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":["command","run","sequence","status-bar","vscode","vscode-extension"],"created_at":"2024-08-01T16:02:54.338Z","updated_at":"2025-04-06T22:11:45.971Z","avatar_url":"https://github.com/usernamehw.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"[![Version](https://img.shields.io/visual-studio-marketplace/v/usernamehw.commands)](https://marketplace.visualstudio.com/items?itemName=usernamehw.commands)\n[![Installs](https://img.shields.io/visual-studio-marketplace/i/usernamehw.commands)](https://marketplace.visualstudio.com/items?itemName=usernamehw.commands)\n[![Rating](https://img.shields.io/visual-studio-marketplace/r/usernamehw.commands)](https://marketplace.visualstudio.com/items?itemName=usernamehw.commands)\n[![OpenVSX Downloads](https://shields.io/open-vsx/dt/usernamehw/commands?label=OpenVSX%20Downloads)](https://open-vsx.org/extension/usernamehw/commands)\n\n## Features\n\n- Run commands with arguments (\"args\")\n- Run multiple commands (in sequence)\n- Use Tree View / Quick Pick / Status Bar / Document link to run commands\n- Assign keyboard shortcut to specified commands\n- Create alias for existing commands\n\n## Simple command\n\n```js\n\"Toggle activity\": \"workbench.action.toggleActivityBarVisibility\",\n```\n\n![simple](img/simple.gif)\n\n## Command with arguments\n\n```js\n\"Typing\": {\n    \"command\": \"editor.action.insertSnippet\",\n    \"args\": {\n        \"snippet\": \"Typing... \",\n    },\n},\n```\n\n![arguments](img/args.gif)\n\n## Multiple commands (sequence)\n\n```js\n\"Toggle multiple settings\": {\n    \"sequence\": [\n        \"editor.action.toggleMinimap\",\n        \"workbench.action.toggleStatusbarVisibility\",\n    ],\n},\n```\n\n![sequence](img/sequence.gif)\n\n## Tree View icons [list](https://code.visualstudio.com/api/references/icons-in-labels#icon-listing) | [colors](https://code.visualstudio.com/api/references/theme-color)\n\n```js\n\"GitHub\": {\n    \"icon\": \"github\",\n},\n\"Flame\": {\n    \"icon\": \"flame\",\n    \"iconColor\": \"errorForeground\",\n},\n```\n\n![icons](img/tree_icon.png)\n\n## Folders (nested items)\n\n```js\n\"folder\": {\n    \"nestedItems\": {\n        \"Flame\": {\n            \"icon\": \"flame\",\n            \"iconColor\": \"errorForeground\",\n        },\n        \"Trusted\": {\n            \"icon\": \"workspace-trusted\",\n            \"iconColor\": \"terminal.ansiGreen\",\n        },\n    },\n},\n```\n\n![folder](img/folder.gif)\n\n## Quick Pick `commands.openAsQuickPick`\n\n![quick_pick](img/quick_pick.gif)\n\n## Status Bar\n\n```js\n\"Toggle line numbers\": {\n    \"command\": \"commands.toggleSetting\",\n    \"args\": {\n        \"setting\": \"editor.lineNumbers\",\n        \"value\": [\n            \"on\",\n            \"off\",\n        ],\n    },\n    \"statusBar\": {\n        \"alignment\": \"left\",\n        \"text\": \"🔢\",\n        \"priority\": -9999,\n    },\n},\n```\n\n![status_bar](img/status_bar.gif)\n\n\n\u003c!-- COMMANDS_START --\u003e\n## Commands (12)\n\n|Command|Description|\n|-|-|\n|commands.openAsQuickPick|Commands: Open as Quick Pick|\n|commands.selectAndRun|Commands: Select and run command|\n|commands.rerun|Commands: Rerun last command|\n|commands.suggestCommands|Commands: Suggest (autocomplete) commands|\n|commands.suggestCodicons|Commands: Suggest [Codicons](https://code.visualstudio.com/api/references/icons-in-labels)|\n|commands.suggestVariables|Commands: Suggest variables that are supported by this extension's variable substitutions, e.g: `${workspaceFolderBasename}`. [📚 Docs](https://github.com/usernamehw/vscode-commands/blob/master/docs/documentation.md#variable-substitution)|\n|commands.suggestSettings|Commands: Suggest setting ids (user \u0026 workspace).|\n|commands.suggestColors|Commands: Suggest theme color ids [theme-color](https://code.visualstudio.com/api/references/theme-color).|\n|commands.newCommand|Commands: Add new command to the list|\n|commands.escapeCommandUriArgument|Commands: Escape command uri argument|\n|commands.startTerminalWatch|Commands: Start Terminal Watching|\n|commands.extensionModifiedSettings|Commands: Show modified settings from Extension|\n\u003c!-- COMMANDS_END --\u003e\n\n\u003c!-- SETTINGS_START --\u003e\n## Settings (16)\n\n|Setting|Default|Description|\n|-|-|-|\n|commands.commands|\\{\\}|Main extension property. Commands that will be rendered in the View.|\n|commands.variableSubstitutionEnabled|**true**|Allow `\"args\"` to replace variables: [📚 Docs](https://github.com/usernamehw/vscode-commands/blob/master/docs/documentation.md#variable-substitution).|\n|commands.workspaceCommands|\\{\\}|Commands that will be rendered in the View, specific to the workspace.|\n|commands.alias|\\{\\}|Use shorter command ids. Extension registers aliased commands so that they can be also used in keybindings.|\n|commands.showKeybindings|**false**|Whether or not to show keyboard shortcuts assigned to command contributed by user. (Currently only displayed in Tree View).|\n|commands.treeViewCollapseFolders|**false**|Collapse folders by default. Requires reload before being applied.|\n|commands.treeViewStatusBarVisibleSymbol|\"💠\"|Symbol used in the tree view to indicate that command is also visible in the status bar.|\n|commands.treeViewWorkspaceCommandSymbol|\"🎯\"|Symbol used in the tree view to indicate workspace command (from `#commands.workspaceCommands#`) setting.|\n|commands.statusBarDefaultText|\"same\"|Controls the text of Status Bar item when adding from Tree View context menu.|\n|commands.statusBarDefaultPosition|\"left\"|Where to put command on Status Bar (left or right).|\n|commands.quickPickIncludeAllCommands|**false**|When checked - include all commands from Command Palette to the Quick Pick.|\n|commands.populateCommandPalette|**false**|Adds all items to Command Palette (Requires editor reload after every change of main config `#commands.commands#`).|\n|commands.documentLinksEnabled|**false**|Run commands as links in documents. Links have format `@command?args@`.\u003cbr\u003e[issues/2](https://github.com/usernamehw/vscode-commands/issues/2)|\n|commands.documentLinksPattern|\"\"|[Glob](https://code.visualstudio.com/docs/editor/glob-patterns) for `#commands.documentLinksEnabled#`. Example: `**/*.{ts,js}` - only enable in TypeScript \u0026 JavaScript files.|\n|commands.toggleSettings.showNotification|**false**|When enabled - show notification after using `commands.toggleSetting` or `commands.incrementSetting`.|\n|commands.watchTerminalStatusBar|{...}|Enable status bar indicator that is supposed to show the status of a running in terminal command (`dev` \\| `watch`...). Will only work with contributed terminal profile `Commands:Watch`. Status of errors might not be perfect because it relies on simple text match.|\n\u003c!-- SETTINGS_END --\u003e\n\n```ts\n// Command object structure\ninterface CommandObject {\n    command: string;// command id to execute\n    args?: unknown;// command arguments to execute\n    delay?: number;// delay (ms) BEFORE execution\n    repeat?: number;// run this command or sequence this number of times\n    icon?: string;// icon id https://code.visualstudio.com/api/references/icons-in-labels#icon-listing\n    iconColor?: string;// color id https://code.visualstudio.com/api/references/theme-color\n    markdownTooltip?: string;// add custom markdown text to hover tooltip\n    disableTooltip?: boolean;// do not show the hover tooltip for this Tree View Item\n    hidden?: boolean;// Do not show this in Tree View\n    inputs?: {...}[];// Objects for input variable substitution like https://code.visualstudio.com/docs/editor/variables-reference#_input-variables\n\n    sequence?: (CommandObject | string)[];// execute multipe commands\n\n    nestedItems: {// Transform this into folder: Group items\n        [key: string]: CommandObject\n    }\n\n    // add command or folder to status bar\n    statusBar?: {\n        alignment: 'left' | 'right';// status bar alignment\n        text: string;// status bar item text\n        name?: string;// name of the item in status bar context menu\n        priority?: number;// item position (can also be a negative number)\n        tooltip?: string;// hover text\n        markdownTooltip?: string;// hover text (in markdown)\n        hidden?: boolean;// do not show this status bar item\n        color?: string;// color of status bar item text\n        backgroundColor?: 'error' | 'warning';// status bar item background color\n        activeEditorGlob?: string// only show status bar item when active editor matches glob pattern\n        activeEditorLanguage?: string;// only show status bar item when active editor language id matches\n        updateEvents?: {// update status bar text (substitute variables)\n            kind: 'onDidConfigurationChange' | 'onDidChangeActiveTextEditor' | 'onDidChangeTextEditorSelection' | 'interval';\n        }[]\n    };\n}\n```\n\n## [Built-in commands (with args)](https://code.visualstudio.com/api/references/commands)\n\n### `type` Type text into active editor\n\n```js\n\"Typing\": {\n    \"command\": \"type\",\n    \"args\": {\n        \"text\": \"---\",\n    },\n},\n```\n\n### `workbench.action.tasks.runTask` Run [task](https://code.visualstudio.com/docs/editor/tasks) by its `label`\n\n```js\n// tasks.json\n{\n    \"label\": \"hello\",\n    \"type\": \"shell\",\n    \"command\": \"echo Hello\",\n},\n// commands\n\"Run task\": {\n    \"command\": \"workbench.action.tasks.runTask\",\n    \"args\": \"hello\",\n},\n```\n\n### `editor.action.insertSnippet` Insert [Snippet](https://code.visualstudio.com/docs/editor/userdefinedsnippets)\n\n```js\n\"Insert snippet\": {\n    \"command\": \"editor.action.insertSnippet\",\n    \"args\": {\n        \"snippet\": \"$BLOCK_COMMENT_START ${0:?} $BLOCK_COMMENT_END\",\n    },\n},\n```\n\n### `workbench.action.terminal.sendSequence` Send text to active terminal\n\n```js\n\"Terminal: Run Watch\": {\n    \"command\": \"workbench.action.terminal.sendSequence\",\n    \"args\": {\n        \"text\": \"npm run watch\\r\",\n    },\n},\n```\n\n### `workbench.action.quickOpen` Quick access\n\nCan open Quick Pick with prefilled prefix (`@...` - symbol, `view ...` - open view, ...)\n\n```js\n\"Quick open (symbol)\": {\n    \"command\": \"workbench.action.quickOpen\",\n    \"args\": \"?\",\n},\n```\n\n### `workbench.action.openSettings` Open settings with prefilled input value\n\n```js\n\"Open Settings\": {\n    \"command\": \"workbench.action.openSettings\",\n    \"args\": \"commands\",\n},\n```\n\n### `workbench.action.openGlobalKeybindings` Open keybindings with prefilled value\n\n```js\n\"Quick Keybindings Editor\": {\n    \"command\": \"workbench.action.openGlobalKeybindings\",\n    \"args\": \"commands.\",\n},\n```\n\n### `workbench.extensions.search` Open Extensions View with prefilled value\n\n```js\n\"Quick Extensions View\": {\n    \"command\": \"workbench.extensions.search\",\n    \"args\": \"@builtin\",\n},\n```\n\n### `editor.action.codeAction` Execute [code action](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)\n\n```js\n\"Organize imports\": {\n    \"command\": \"editor.action.codeAction\",\n    \"args\": {\n        \"kind\": \"source.organizeImports\",\n    },\n},\n```\n\n### `workbench.action.findInFiles` Open search with specified args\n\n```js\n\"Search with args\": {\n    \"command\": \"workbench.action.findInFiles\",\n    \"args\": {\n        \"query\": \"TODO\",\n        \"isRegex\": false,\n        \"isCaseSensitive\": false,\n        \"matchWholeWord\": false,\n        \"preserveCase\": false,\n        \"excludeSettingAndIgnoreFiles\": true,\n        \"triggerSearch\": true,\n        \"onlyOpenEditors\": false,\n        // \"replace\": \"\",\n        // \"filesToInclude\": \"\",\n        // \"filesToExclude\": \"\",\n    },\n},\n```\n\n### `editor.actions.findWithArgs` Open Editor Find Widget\n\n```js\n\"Find Widget with args\": {\n    \"command\": \"editor.actions.findWithArgs\",\n    \"args\": {\n        \"searchString\": \"TODO\",\n        \"replaceString\": \"\",\n        \"isRegex\": false,\n        \"isCaseSensitive\": false,\n        \"matchWholeWord\": false,\n        \"preserveCase\": false,\n        \"findInSelection\": false,\n    },\n},\n```\n\n### `search.action.openNewEditor` Open [Search Editor](https://code.visualstudio.com/updates/v1_43#_search-editors) with specified args\n\n```js\n\"Open search editor with args\": {\n    \"command\": \"search.action.openNewEditor\",\n    \"args\": {\n        \"query\": \"TODO\",\n        \"isRegexp\": false,\n        \"isCaseSensitive\": false,\n        \"matchWholeWord\": false,\n        \"preserveCase\": false,\n        \"excludeSettingAndIgnoreFiles\": true,\n        \"triggerSearch\": true,\n        \"contextLines\": 2,\n        \"showIncludesExcludes\": true,\n        // \"filesToInclude\": \"\",\n        // \"filesToExclude\": \"\",\n    },\n},\n```\n\n### `cursorMove` Move cursor to a logical position in the view\n\nArguments object:\n\n- **to** A mandatory logical position value providing where to move the cursor.\n\u003e 'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\u003e 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\u003e 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\u003e 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n- **by** Unit to move. Default is computed based on 'to' value.\n\u003e 'line', 'wrappedLine', 'character', 'halfLine'\n- **value** Number of units to move. Default is '1'.\n- **select** If 'true' makes the selection. Default is 'false'.\n\n```js\n\"Cursor move 10 down\": {\n    \"command\": \"cursorMove\",\n    \"args\": {\n        \"to\": \"down\",\n        \"by\": \"line\",\n        \"value\": 10,\n    },\n},\n```\n\n### `editorScroll` Scroll editor in the given direction\n\nArguments object:\n\n- **to** A mandatory direction value (`up` or `down`).\n- **by** Unit to move. Default is computed based on 'to' value. (`line`, `wrappedLine`, `page`, `halfPage`).\n- **value**: Number of units to move. Default is 1.\n- **revealCursor**: If 'true' reveals the cursor when it is outside view port.\n\n```js\n\"Scroll 10 lines down\": {\n    \"command\": \"editorScroll\",\n    \"args\": {\n        \"to\": \"down\",\n        \"by\": \"line\",\n        \"value\": 10,\n        \"revealCursor\": true,\n    },\n},\n```\n\n\n### `moveActiveEditor` Move the active editor by tabs or groups\n\n- **to** String value providing where to move (`left` or `right`).\n- **by** String value providing the unit for move (by `tab` or by `group`).\n- **value** Number value providing how many positions or an absolute position to move.\n\n```js\n\"Move editor to the left\": {\n    \"command\": \"moveActiveEditor\",\n    \"args\": {\n        \"to\": \"left\",\n        \"by\": \"tab\",\n        \"value\": 50,\n    },\n},\n```\n\n### `vscode.setEditorLayout` Sets the editor layout\n\nExample for a 2x2 grid:\n\n```js\n\"2x2 grid\": {\n    \"command\": \"vscode.setEditorLayout\",\n    \"args\": { \"orientation\": 0, \"groups\": [{ \"groups\": [{}, {}], \"size\": 0.5 }, { \"groups\": [{}, {}], \"size\": 0.5 }] },\n},\n```\n\n### `editor.emmet.action.wrapWithAbbreviation` Wrap text with emmet\n\n```js\n\"Wrap in div\": {\n    \"command\": \"editor.emmet.action.wrapWithAbbreviation\",\n    \"args\": {\n        \"abbreviation\": \"div\",\n        \"language\": \"html\",\n    },\n},\n```\n\n### `workbench.action.openSettingsJson` Opens `settings.json` file\n\n```js\n\"Reveal setting json\": {\n    \"command\": \"workbench.action.openSettingsJson\",\n    \"args\": {\n        \"openToSide\": true,\n        \"revealSetting\": {\n            \"key\": \"editor.fontSize\",\n        },\n    },\n},\n```\n\n### `vscode.removeFromRecentlyOpened` Removes an entry with the given path from the recently opened list\n\n```js\n\"Remove from recently opened\": {\n    \"command\": \"vscode.removeFromRecentlyOpened\",\n    \"args\": \"C:/temp/1.txt\",\n},\n```\n\n### `vscode.openIssueReporter` Opens the issue reporter with the provided extension id as the selected source\n\n- **extensionId** - extensionId to report an issue on\n\n```js\n\"Issue: preselect extension\": {\n    \"command\": \"vscode.openIssueReporter\",\n    \"args\": \"usernamehw.commands\",\n},\n```\n\n### `workbench.extensions.installExtension` Install extension by id\n\n```js\n\"Install extension\": {\n    \"command\": \"workbench.extensions.installExtension\",\n    \"args\": \"usernamehw.errorlens\",\n},\n```\n\n### `workbench.extensions.uninstallExtension` Uninstall extension by id\n\n```js\n\"Uninstall extension\": {\n    \"command\": \"workbench.extensions.uninstallExtension\",\n    \"args\": \"usernamehw.errorlens\",\n},\n```\n\n### `workbench.extensions.action.showExtensionsWithIds` Show extensions in Extensions View by id\n\n```js\n\"Show specific extensions\": {\n    \"command\": \"workbench.extensions.action.showExtensionsWithIds\",\n    \"args\": [\n        \"usernamehw.commands\",\n        \"usernamehw.errorlens\",\n    ],\n},\n```\n\n## Additional commands\n\n### `commands.toggleSetting` Toggle settings\n\n```js\n\"Toggle boolean setting (pass string args)\": {\n    \"command\": \"commands.toggleSetting\",\n    \"args\": \"editor.renderIndentGuides\",\n},\n```\n\n```js\n\"Pass array of values to cycle through\": {\n    \"command\": \"commands.toggleSetting\",\n    \"args\": {\n        \"setting\": \"workbench.colorTheme\",\n        \"value\": [\"Monokai\", \"Kimbie Dark\"],\n    },\n    \"icon\": \"symbol-color\",\n},\n```\n\n```js\n\"Toggle workspace setting\": {\n    \"command\": \"commands.toggleSetting\",\n    \"args\": {\n        \"setting\": \"workbench.editor.showTabs\",\n        \"target\": \"workspace\",\n    },\n},\n```\n\n```js\n\"Set/reset setting\": {\n    \"command\": \"commands.toggleSetting\",\n    \"args\": {\n        \"setting\": \"window.zoomLevel\",\n        \"value\": [0],\n    },\n},\n```\n\n### `commands.incrementSetting` Increment/decrement setting\n\n```js\n\"Font size ++\": {\n    \"command\": \"commands.incrementSetting\",\n    \"args\": {\n        \"setting\": \"editor.fontSize\",\n        \"value\": 0.5,\n        // \"target\": \"workspace\",\n    },\n},\n```\n\n```js\n\"Font size --\": {\n    \"command\": \"commands.incrementSetting\",\n    \"args\": {\n        \"setting\": \"editor.fontSize\",\n        \"value\": -0.5,\n    },\n},\n```\n\n### `commands.toggleTheme` Toggle themes by groups (depending on active theme kind)\n\n```js\n\"Toggle Themes\": {\n    \"command\": \"commands.toggleTheme\",\n    \"args\": {\n        \"dark\": \"Default Dark+,GitHub Dark\",\n        \"light\": \"Default Light+,GitHub Light\",\n    },\n},\n```\n\n### `commands.openFolder` Open file/folder in vscode\n\n```js\n\"Open file\": {\n    \"command\": \"commands.openFolder\",\n    \"args\": \"C:\\\\temp\\\\temp.txt\",// Accepts array [\"C:/temp/1.txt\",\"C:/temp/2.txt\"]\n},\n\"Open relative file\": {\n    \"command\": \"commands.openFolder\",\n    \"args\": \"./package.json\",// open relative to the first opened workspace folder\n},\n\"Open folder\": {\n    \"command\": \"commands.openFolder\",\n    \"args\": \"C:\\\\temp\",\n},\n```\n\n### `commands.focusTerminal` Focus specific terminal\n\n```js\n\"Focus newest non-task terminal\": {\n    \"command\": \"commands.focusTerminal\",\n},\n\"Focus terminal named 'foobar' (string argument)\": {\n    \"command\": \"commands.focusTerminal\",\n    \"args\": \"foobar\",\n},\n\"Focus terminal named 'foobar'\": {\n    \"command\": \"commands.focusTerminal\",\n    \"args\": {\n        \"target\": \"newest\",// focus newest matching terminal; create new if no match\n        \"name\": \"foobar\",// if no match, assign a name to the new terminal\n    },\n},\n```\n\n### `commands.runInTerminal` Send text to new (or specified) terminal\n\n```js\n\"Terminal =\u003e watch (string argument)\": {\n    \"command\": \"commands.runInTerminal\",\n    \"args\": \"npm run watch\",\n},\n\"Terminal =\u003e watch\": {\n    \"command\": \"commands.runInTerminal\",\n    \"args\": {\n        \"text\": \"npm run watch\",\n        \"name\": \"watch\",\n        \"reveal\": true,\n        \"waitForExit\": false,// will wait for terminal to exit before running next command\n        \"reuse\": \"newest\",// reuse newest same-named terminal; create new if no match\n    },\n},\n```\n\n### `commands.startDebugging` Start debugging by \"name\" property from **launch.json**\n\n```js\n\"Debug extension\": {\n    \"command\": \"commands.startDebugging\",\n    \"args\": \"Extension\",\n},\n```\n\n### `commands.setEditorLanguage` Change active editor [language id](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers). VSCode supports this now even without extension: [#213688](https://github.com/microsoft/vscode/issues/213688)\n\n```js\n\"Set Language JavaScript\": {\n    \"command\": \"commands.setEditorLanguage\",\n    \"args\": \"javascript\",\n},\n```\n\n### `commands.clipboardWrite` Write text to clipboard\n\n```js\n\"Populate clipboard\": {\n    \"command\": \"commands.clipboardWrite\",\n    \"args\": \"||||||||\",\n},\n```\n\n### `commands.showNotification` Show VSCode notification\n\n```js\n\"Msg\": {\n    \"command\": \"commands.showNotification\",\n    \"args\": \"info msg\",\n},\n\"Msg error\": {\n    \"command\": \"commands.showNotification\",\n    \"args\": {\n        \"severity\": \"error\",// \"warning\" | \"info\"\n        \"message\": \"bad\",\n    },\n},\n```\n\n### `commands.showStatusBarNotification` Show notification in Status Bar\n\n```js\n\"Notification in status bar\": {\n    \"command\": \"commands.showStatusBarNotification\",\n    \"args\": {\n        \"message\": \"Read me fast\",\n        \"color\": \"#f00\",\n        \"timeout\": 5000,\n    },\n},\n```\n\n### `commands.openExternal` Open link in default browser\n\n```js\n\"Open google.com\": {\n    \"command\": \"commands.openExternal\",\n    \"args\": \"https://www.google.com\",// Accepts array [\"https://www.google.com\",\"https://github.com/\"]\n},\n\"Open Extension Preview\": {\n    \"command\": \"commands.openExternal\",\n    \"args\": \"vscode:extension/usernamehw.commands\",\n},\n```\n\n### `commands.open` Open file in default app (Uses [open](https://github.com/sindresorhus/open#readme))\n\n```js\n\"Open in default app\": {\n    \"command\": \"commands.open\",\n    \"args\": \"C:\\\\temp\\\\img.png\",\n},\n\"Open in specified app\": {\n    \"command\": \"commands.open\",\n    \"args\": {\n        \"target\": \"C:\\\\temp\\\\img.png\",\n        \"app\": \"firefox\",// Or absolute path\n        \"arguments\": [\"-devtools\"],\n    },\n},\n```\n\n### `commands.revealFileInOS` Open system file explorer at the specified path\n\n```js\n\"commands.revealFileInOS\": {\n    \"command\": \"commands.revealFileInOS\",\n    \"args\": \"C:/Users\",\n},\n```\n\n### `commands.extensionModifiedSettings` Pick an extension and show all modified settings(not default) from it\n\n---\n\n## Running sequence without adding it to `settings.json`\n\nIf the only purpose for a command sequence is to run it from a keybinding, then it might be easier to just run it from a `keybindings.json` file directly:\n\n```js\n{\n    \"key\": \"ctrl+shift+9\",\n    \"command\": \"commands.run\",\n    \"args\": [\n        \"editor.action.toggleMinimap\",\n        \"workbench.action.toggleSidebarVisibility\",\n    ],\n},\n```\n\n## Using your own color for tree view icon\n\n```js\n\"workbench.colorCustomizations\": {\n    \"mycolor\": \"#ffc01f\",\n},\n\"commands.commands\": {\n    \"Command\": {\n        \"icon\": \"dashboard\",\n        \"iconColor\": \"mycolor\",\n    },\n},\n```\n\n## [📚 More examples](https://github.com/usernamehw/vscode-commands/tree/master/docs/examples.md)\n## [📚 Docs](https://github.com/usernamehw/vscode-commands/blob/master/docs/documentation.md)\n\n## Upstream issues\n\nPlease upvote the following VS Code issues:\n\n- [Provide some richer (optional) UI for custom tree views](https://github.com/microsoft/vscode/issues/97190)\n- [Allow TreeItem.label to support MarkdownString](https://github.com/microsoft/vscode/issues/115365)\n\n\u003c!--\n\nOpen files by glob? vscode.workspace.findFiles\ngo to symbol in file\n\nworkbench.action.terminal.newWithCwd\n`editor.action.refactor` \u0026 `editor.action.sourceAction` - both covered by `editor.action.codeAction`\nworkbench.action.files.newUntitledFile (arg `viewType` eg `vscode.markdown.preview.editor`)\nvscode.openWith `commands.executeCommand(\"vscode.openWith\", uri, MyCustomEditor.viewType);`\neditor.unfold\neditor.fold\n--\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusernamehw%2Fvscode-commands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusernamehw%2Fvscode-commands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusernamehw%2Fvscode-commands/lists"}