Skip to content

Add InvokeRegisteredEditorCommand to package.json #2145

Closed
@SeeminglyScience

Description

@SeeminglyScience

You used to be able to (or at least I could have sworn you could) set a key binding to a specific editor command like this:

{
    "key": "alt+shift+s",
    "command": "PowerShell.InvokeRegisteredEditorCommand",
    "args": { "commandName": "ConvertTo-SplatExpression" },
    "when": "editorLangId == 'powershell'"
},

I think they added validation to the keybindings.json so that it would no longer work with "non-public" commands.

We should add the following to package.json > contributes > commands

{
  "command": "PowerShell.InvokeRegisteredEditorCommand",
  "title": "Invoke Registered Editor Command",
  "category": "PowerShell"
},

And also the under package.json > contributes > menus > commandPalette

{
  "command": "PowerShell.InvokeRegisteredEditorCommand",
  "when": "false"
},

After adding these to my local copy it works as expected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions