Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of all available commands in VSCode

Tags:

Where can I find the list of all commands available in VSCode and their description?

I'm only aware of these sources:

In the official docs:

  • This list which only seems to include a subset of Visual Studio Code commands that you might use with vscode.commands.executeCommand API (why is this only a subset of the full list?)
  • This other list in the keybindings doc, which also only seems to include a subset of all commands available (I suppose those tied to a default keybinding?)

In the editor itself:

I can see a list of commands when I open the "default keybindings". Many actions are commented out with //, but interestingly I don't think this includes all the commands either (e.g. maximizeOtherEditor isn't listed)


Does VSCode have an official list of commands (commandID's) either in its documentation or in its code base? If not:

  • What's the closest to it?
  • What's a good way to navigate the code base to try to find all commands and what they do?
like image 950
Amelio Vazquez-Reina Avatar asked Oct 13 '19 19:10

Amelio Vazquez-Reina


People also ask

How do you see all commands in VS Code?

Note: You can review the full set of VS Code commands via the Keyboard Shortcuts editor File > Preferences > Keyboard Shortcuts (on macOS Code > Preferences > Keyboard Shortcuts).

How list all functions in VS Code?

You could also do Ctrl+P and type @ - this lists all functions/symbols in the file.

How do I get a list of VS Code extensions?

You can browse and install extensions from within VS Code. Bring up the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of VS Code or the View: Extensions command (Ctrl+Shift+X). This will show you a list of the most popular VS Code extensions on the VS Code Marketplace.

How do you get the command palette in VS Code?

Command Palette# VS Code is equally accessible from the keyboard. The most important key combination to know is Ctrl+Shift+P, which brings up the Command Palette.


1 Answers

I believe that content of "Preferences: Default Keyboard Shortcuts (JSON)" (command ID workbench.action.openDefaultKeybindingsFile) really shows comprehensive list of all native and extensions-contributed commands VSC knows about at moment when invoked.

This file shows keys from VSC's defaults and extension manifests. Commands with no suggested defaults are those commented out at the end of file.

Their descriptions (as seen in the Command Palette, Keyboard Shortcuts settings, extension Contributions tab and elsewhere) are supposedly in localization properties and I believe there is currently no way to see them along their respective command IDs in single convenient "localized" list. So for now the only way to read the description of command found in aforementioned JSON is pasting its ID into Keyboard Shortcuts search field. (Would be delighted to be proven wrong.)

like image 198
myf Avatar answered Sep 18 '22 11:09

myf