Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Direct Command at EditorNew to Visual Studio Code? Get it now.
Direct Command at Editor

Direct Command at Editor

pit000

| (0) | Free
Run vs code internal commands directly from editor by click
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Run VS Commands from Editor

Run VS code internal commands directly from editor by click or hotkey

Requirements

  • Visual Studio Code 1.48+

How to Use

  • Only tested on Windows

  • By default the extention is enabled, you can toggle it using the command palette. Trigger the command palette (Ctrl / Cmd + Shift + P) -> Command Runner: Enable / Disable.

Cmds

  1. Once it is enabled, above every line that contains the symbols $> followed by a code snipped (between ``backticks\) appears a button to execute the command (or run the current line or nearest cursor line by alt+j key), like:
$> `cursorDown`
  1. Also can run multiple commands, separated by "|":
$> `cursorUp|cursorUp|cursorUp`
  1. With arguments cmd("arg")

  2. With arguments and eval cmd[eval("arg")]

$> `vscode.open[vscode.Uri.file("C:/Folder/File.txt")]`
  1. Eval commands and see their values at toast notification and console log eval(cmd)
$> `eval(vscode.window.activeTextEditor.document.fileName)`
$> `eval(vscode.workspace.workspaceFolders)`
$> `eval(1 + 2)`

Aliases

  1. Open file (at VS Code) alias. Works with relative path opener("FILEPATH")
$> `opener("C:/Folder/File.txt")`
  1. Reveal at explorer (path must exist and the last slash is optional) alias revealer("PATH")
$> `revealer("C:/Folder/")`
$> `revealer("C:/Folder/File.txt")`
  1. For both reveal or open: works with relative path or wildcard (* at the end will open the closest match in case of file or folder)
$> `opener("./../../../Folder/File.txt")`
$> `revealer("C:/Users/lic*")`
  1. Environmental variables also works.
  • VS Code: ${key:value}
  • Win: %var%
$> `eval("${config:workbench.colorTheme}")`
$> `opener("%ComSpec%")`
$> `revealer("%APPDATA%")`
$> `revealer("${env:USERPROFILE}")`
  1. Copy to clipboard
$> `copy("TEXT")`
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft