microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.23k stars 28.86k forks source link

Add a command to focus last terminal tab #225831

Open pallxk opened 1 month ago

pallxk commented 1 month ago

We have commands to focus terminal tab at a specified index: workbench.action.terminal.focusAtIndex#, but no commands to focus the last terminal tab. It will be convenient to have such a command.

Compared to editor tab, we have both commands to focus editor tab at a specified index workbench.action.openEditorAtIndex# and command to focus last editor tab workbench.action.lastEditorInGroup.

vs-code-engineering[bot] commented 1 month ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

pallxk commented 1 month ago

For those who want this now, you can reference the following keybindings:

[
    {
        "key": "cmd+alt+9",
        "command": "runCommands",
        "args": {
            "commands": [
                "workbench.action.terminal.focusAtIndex1",
                "workbench.action.terminal.focusPrevious",
            ]
        }
    }
]