Skip to content

[alt+left] in terminal is bound to change tab #383

@a-stewart

Description

@a-stewart

In terminal, it is common to use [alt]+[left/right] to navigate whole words, without a pointer this is fairly crucial to navigating larger commands.

With IntelliJ keybindings, these are overridden twice.

The first one runs workbench.action.terminal.focusPrevious/focusNext:

            {
                "key": "alt+left",
                "mac": "shift+cmd+[",
                "command": "workbench.action.terminal.focusPrevious",
                "when": "terminalFocus",
                "intellij": "Select previous tab (Terminal)"
            },
            {
                "key": "alt+right",
                "mac": "shift+cmd+]",
                "command": "workbench.action.terminal.focusNext",
                "when": "terminalFocus",
                "intellij": "Select next tab (Terminal)"
            },

IMO, this should ideally not be bound to alt+left/right as I think if you are in the terminal and pressing those commands, you are most likely wanting to send the commands to the terminal instead?

We could potentially bind it to terminalTabsFocus which is when the user is focused on the terminal tabs.

Alternatively, if we really want to keep the bindings when the user has terminal, focus, could we do terminalCount > 1 so if there is only 1 terminal, we then send the command to the terminal.


Further, if you then disable these keybindings, there is another binding which runs: `workbench.action.previousEditor/nextEditor" with no when clause.

I think this command should have the when clause "!terminalFocus", as again, if the user has the terminal focused, they very likely do not want to toggle editor tabs.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions