microsoft / microsoft/vscode-docs

Document all commands that support passing arguments

Open
#4,298 3 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

commands doc-enhancement
Dominant language
Markdown
Stars
6.6k
Forks
5.8k
Avg merge
11h 43m
Merged PRs (30d)
123

Description

This page has a list of commands: https://code.visualstudio.com/api/references/commands

All of them can be executed from extension with vscode.commands.executeCommand, but some of them can be used from keybindings.json file with "args", like vscode.setEditorLayout or editorScroll. The list is not complete, though.

I think this page should contain all commands that accept arguments.

2 notes:

  1. keybindings.json: not possible to run some commands like vscode.openFolder
  2. extension api: For specific commands api would be a preferable choice

For instance, there is a command that supports accepting args

{
	"key": "ctrl+enter",
	"command": "workbench.action.terminal.sendSequence",
	"args": {
		"text": "npm run build\r"
	},
	"when": "terminalFocus"
},

And it's pretty useful for users, but if you are an extension author - then the api Terminal.sendText() is most likely what you need.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Commands reference page and compare its list with commands usable through keybindings.json args and vscode.commands.executeCommand. Verify the examples such as vscode.setEditorLayout, editorScroll, and workbench.action.terminal.sendSequence, then document the supported argument-taking commands while noting cases where a specific extension API is preferable.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.