Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make keybindings accept multiple commands (macro support) #177492

Closed
NatoBoram opened this issue Mar 17, 2023 · 1 comment
Closed

Make keybindings accept multiple commands (macro support) #177492

NatoBoram opened this issue Mar 17, 2023 · 1 comment
Assignees

Comments

@NatoBoram
Copy link

In keybindings.json, we can add keyboard shortcuts that will perform one action. Example:

{
  "key": "ctrl+k l",
  "command": "editor.action.insertSnippet",
  "when": "editorTextFocus",
  "args": {
    "langId": "typescript",
    "name": "Log copied variable"
  }
}

However, VSCode would be much, much more powerful if one keybinding could perform multiple actions at the same time.

{
  "key": "ctrl+k l",
  "when": "editorTextFocus",
  "macro": [
    { "command": "editor.action.clipboardCopyAction" },
    { "command": "cursorEnd" },
    {
      "command": "editor.action.insertSnippet",
      "args": { "langId": "typescript", "name": "Log selected variable" }
    }
  ]
}
@ulugbekna
Copy link
Contributor

Duplicate of #871

@ulugbekna ulugbekna marked this as a duplicate of #871 Mar 17, 2023
@ulugbekna ulugbekna closed this as not planned Won't fix, can't repro, duplicate, stale Mar 17, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants