DEV Community

Discussion on: Bring Your Vim/Tmux Navigation Reflexes to VS Code

Collapse
 
ajkerrigan profile image
AJ Kerrigan

I don't use notebooks in VS Code much so I didn't have any immediate insights, but your comment got me curious so I went looking for some :D. And the first place I landed was this open issue which you already commented on!

github.com/microsoft/vscode/issues...

I replied to your comment there, but you can add focusAboveGroup and focusBelowGroup bindings to make the workaround cover all directions:

    {
        "key": "ctrl+k ctrl+h",
        "command": "workbench.action.focusLeftGroup",
        "when": "notebookEditorFocused"
    },
    {
        "key": "ctrl+k ctrl+l",
        "command": "workbench.action.focusRightGroup",
        "when": "notebookEditorFocused"
    },
    {
        "key": "ctrl+k ctrl+j",
        "command": "workbench.action.focusBelowGroup",
        "when": "notebookEditorFocused"
    },
    {
        "key": "ctrl+k ctrl+k",
        "command": "workbench.action.focusAboveGroup",
        "when": "notebookEditorFocused"
    }
Enter fullscreen mode Exit fullscreen mode

(At some point after writing this post, I moved my nav bindings into chords off ctrl+k only because I kept running into edge cases where I wanted ctrl+k available.)