question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Macro like keybindings

See original GitHub issue

When creating keyboard shortcuts, it would be nice if you could pass an array of commands (to execute like a macro) that would run the commands in that order.

So take this for example:

{
    "key": "ctrl+s",
    "command": [
        "editor.action.format",
        "editor.action.trimTrailingWhitespace",
        "workbench.action.files.save"
    ],
    "when": "editorTextFocus"
}

It would format the file, remove trailing white space then save the file.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:738
  • Comments:58 (6 by maintainers)

github_iconTop GitHub Comments

68reactions
eliliamcommented, Jan 17, 2019

2019 is asking why this feature is still not added yet! @sandy081, @joaomoreno and others working on the keybindings, this Issue was opened in 2015, that’s four full years of development time not spent adding an extremely useful and seemingly simple feature. The back end of the keybindings API could just concatenate the listed commands and run them one after another. Please add this, there is no official fix besides using extensions for a very basic feature!

40reactions
mackcodingcommented, Jun 8, 2018

how is this not a feature yet?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Speed up your gameplay with key bindings and macros
Customizing existing key bindings or creating your own is very simple. Just find the command you want to bind and then click on...
Read more >
An *easy* guide to macros and key bindings for non ... - Reddit
This is a simple, step-by-step guide for those who felt overwhelmed by other multi-page macro guides and want to up their gameplay in...
Read more >
2 Ways to Assign Keyboard Shortcuts to Macros - Excel Campus
1. The Macro Options Window: Shortcut Key · After selecting the macro that you want to assign the shortcut to, click the Options...
Read more >
Keyboard Macro Beta - Visual Studio Marketplace
including ones via code completion or IME as well. Editor keyboard shortcuts in VS Code default keybindings. such as cursor movement, ...
Read more >
Keyboard Macros - EmacsWiki
Keyboard macros are a powerful Emacs feature. A keyboard macro is simply a recording of a sequence of key sequences. A key sequence...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found