Tuesday, June 20, 2017

VSC Command Log

Leave a Comment

Trying to figure out how to create a key binding for a specific command. I can see the command in the pallete but it has no bindings so I can't see it in the keybindings.json.

Is there any way I can LOG all commands being executed within VSC so that I can perform the command and see the command name in the log?

Edit:

To make it clear:

  • I want general method to know how I can find what commands were issued along with their command IDs.
  • I already know I find some commands in the default keybindings file and that's NOT a general way to find the command you have run. It doesn't list all command not does it explain what they each are and you can't use it to verify that it is the command you executed.

1 Answers

Answers 1

The "Toggle Line Comment" command's id is editor.action.commentLine.

You can find all the command ids by using the search feature in the Keyboard Shortcuts Editor (on macOS you can open it via Application Menu > Preferences > Keyboard Shortcuts or using the shortcut Cmd+K Cmd+S).

In the keybindings.json you can trigger the autocomplete help (i.e. Ctrl+Space) and search all available commands.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment