How to Ctrl+Shift+←/→ to select previous or next word at the VSCode integrated terminal?
Asked Answered
R

0

6

How to enable Ctrl+Shift+/ to select (highlight) previous or next word at the integrated terminal of VSCode?

Ctrl+/ in order to move the cursor by one word works perfectly, but Ctrl+Shift+/ outputs D's and C's.

I tried these to the keybindings.json (same for right):

    {
        "key": "ctrl+shift+left",
        "command": "-cursorWordStartLeftSelect",
        "when": "textInputFocus"
    },
    {
        "key": "ctrl+shift+left",
        "command": "-workbench.action.terminal.resizePaneLeft",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+shift+left",
        "command": "cursorWordStartLeftSelect",
        "when": "textInputFocus || terminalFocus"
    },

and

    {
        "key": "ctrl+shift+left",
        "command": "-workbench.action.terminal.resizePaneLeft",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+shift+left",
        "command": "cursorWordStartLeftSelect",
        "when": "terminalFocus"
    },

but didn't work. Any suggestions?

VSCode version: 1.40.2 x64
os: Ubuntu 19.10

Reynold answered 27/11, 2019 at 16:35 Comment(3)
Did you ever figure this one out? I've been plagued by the "C" and "D" output in my terminal as well. The keybinding used to work for me (for switching next/previous terminals), but then all of a sudden stopped. And I haven't been able to figure it out.Jeroldjeroma
Unfortunately, I haven't found any relative option at VSCode. You 're better off using something like oh-my-bash or ohmyzsh and I think that the integrated terminal of VSCode will pick up the configuration.Reynold
Take a look at this solution: apple.stackexchange.com/a/345574/287494Christopher

© 2022 - 2024 — McMap. All rights reserved.