Skip to content

Loop through the repeated execution of a user-defined sequence of commands with every press of the same keybinding

License

Notifications You must be signed in to change notification settings

TangoMan75/vscode-command-cycle

Repository files navigation

GH language GH release GH license GH stars VSCode Extension CI Visitors

🔁 TangoMan vscode-command-cycle

The TangoMan vscode-command-cycle extension for Visual Studio Code enables the repeated execution of a user-defined sequence of commands. These command sequences are configured within the keybindings.json file, providing a customizable workflow.

🚀 Installation

Step 1: Install the Extension

Launch VSCode Quick Open (Ctrl+P), paste the following command, and press Enter.

ext install TangoMan75.command-cycle

Or install the extension via the command line:

code --install-extension TangoMan75.command-cycle

Or install the .vsix package manually:

  1. Download the source code.
  2. Open the Extensions View in VSCode.
  3. Click on the Extensions icon in the Activity Bar.
  4. Click on the three-dot icon (...) in the top-right corner.
  5. From the dropdown menu that appears, select "Install from VSIX...".

Step 2: Configure Keybindings

Edit your VSCode keybindings configuration in the keybindings.json file to define the commands to cycle through.

For example, while using the wmaurer.change-case extension, you can cycle through various text case transformations (e.g., sentence case, title case, camelCase, etc.) by pressing Ctrl+K Ctrl+T repeatedly.

{
    "key": "ctrl+k ctrl+t",
    "command": "command-cycle.loop",
    "args": {
        "commands": [
            "extension.changeCase.sentence",
            "extension.changeCase.title",
            "extension.changeCase.camel",
            "extension.changeCase.pascal"
        ]
    },
    "when": "editorTextFocus && !editorReadonly"
},

Loop through case example

Replace the commands in the commands array with the ones you want to cycle through.

🔥 Usage

  1. Press the keybinding you configured (e.g., Ctrl+K Ctrl+T).
  2. The extension will execute the commands in the order specified in the commands array.
  3. Each subsequent key press will execute the next command in the cycle.

📝 Notes

  • Ensure that the commands you specify in the commands array are valid Visual Studio Code commands.
  • You can find available commands by opening the Command Palette (Ctrl+Shift+P) and typing >.

🤝 Contributing

Thank you for your interest in contributing to TangoMan vscode-command-cycle.

Please review the Code of Conduct and Contribution Guidelines before starting to work on any features.

If you want to open an issue, please check first if it has not been reported already before creating a new one.

📜 License

Copyright (c) 2025 "Matthias Morin" <[email protected]>

License
Distributed under the MIT license.

If you like TangoMan vscode-command-cycle, please star, follow, or tweet:

GitHub stars
GitHub followers
Twitter

... And check out my other cool projects.

👋 Let's Build Your Next Project Together !

Looking for an experienced Full-Stack Partner ?

Clean code. Clear communication.

From first sketch to final launch, I've got your back.

tangoman.io

About

Loop through the repeated execution of a user-defined sequence of commands with every press of the same keybinding

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published