Skip to content

Hot Reload Shortcut for VS Code's Terminal When NOT in Debug Mode #48128

@psygo

Description

@psygo

Use case

I typically don't use Debug Mode on VS Code. I know I probably should invest some time to learn more about it, but, regardless of my lack of knowledge, I feel like there should be a shortcut or setting option to hot reload or hot restart the app simply through the terminal.

Proposal

So far, I'm using the multicommand extension to do this, but I actually don't know how to concatenate it with the ctrl + s action in VS Code, because I couldn't find the corresponding action in the VS Code settings.

In the settings.json:

"multiCommand.commands": [
    {
        "command": "multicommand.hotReloadCustomShortcut",
        "sequence": [
            {
                "command" : "workbench.action.terminal.sendSequence", 
                "args" : {"text" : "r"}
            },
        ]
    }
],

And, in the keybindings.json:

{
    "key": "alt+r",
    "command": "multicommand.hotReloadCustomShortcut"
},

alt + r is already taken by Terminal: Toggle find using regex as a VS Code default, by I overwrite it anyway (because I mostly don't care :P).

Is there a better solution to this? Does Flutter have any plans of implementing this already?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions