question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't leave terminal panel with keybindings

See original GitHub issue

FEATURE REQUEST

What happened: I use keybindings to navigate between tabs, panels and the sidebar. But once I move into the terminal, the keybindings don’t function anymore. ( I guess the terminal doesn’t forward it to vs code?)

What did you expect to happen: I want to switch to a different panel from the terminal, while my active panel is the terminal. Currently I use "<C-p>", "<esc>", which opens the command line, and then exits it again, sending me back to the panel before I entered the terminal.

How to reproduce it (as minimally and precisely as possible): "<C-w>", "j" into terminal, "<C-w>", "k" won’t go back.

Environment: Arch Linux, urxvt terminal with zsh inside vs code

  • Extension (VsCodeVim) version:
  • VSCode version: 1.20.0
  • rxvt-unicode (urxvt) v9.22
  • zsh 5.4.2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:12
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
jesaeryscommented, Jan 13, 2020

Fwiw, I’ve been playing around with this again and apparently ctrl-w now works as expected in terminal. Actually, I got ctrl-w navigation for the explorer working, too. Here’s my current setup (my terminal panel is on the right):

    // j/k to move between split terminals, h to move back to the editor
    {
        "key": "ctrl+w j",
        "command": "workbench.action.terminal.focusNextPane",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+w k",
        "command": "workbench.action.terminal.focusPreviousPane",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+w h",
        "command": "workbench.action.focusActiveEditorGroup",
        "when": "terminalFocus"
    },

    // j/k to move between "open editors", the explorer tree, and outline;
    // l to move back to the editor
    {
        "key": "ctrl+w k",
        "command": "workbench.files.action.focusOpenEditorsView",
        "when": "filesExplorerFocus"
    },
    {
        "key": "ctrl+w j",
        "command": "workbench.files.action.focusFilesExplorer",
        "when": "openEditorsFocus"
    },
    {
        "key": "ctrl+w l",
        "command": "workbench.action.focusActiveEditorGroup",
        "when": "explorerViewletFocus"
    },
    {
        "key": "ctrl+w j",
        "command": "outline.focus",
        "when": "filesExplorerFocus"
    },
    {
        "key": "ctrl+w k",
        "command": "workbench.files.action.focusFilesExplorer",
        "when": "outlineFocused"
    },
    {
        "key": "ctrl+w l",
        "command": "workbench.action.focusActiveEditorGroup",
        "when": "outlineFocused"
    }
9reactions
parhermancommented, Mar 7, 2018

@Chillee here you go:

    {
        "key": "ctrl+h",
        "command": "extension.vim_navigateLeft",
        "when": "vim.active && vim.use<C-w>",
    },
    {
        "key": "ctrl+j",
        "command": "extension.vim_navigateDown",
        "when": "vim.active && vim.use<C-w>",
    },
    {
        "key": "ctrl+k",
        "command": "extension.vim_navigateUp",
        "when": "vim.active && vim.use<C-w>",
    },
    {   "key": "ctrl+k",          
        "command": "workbench.action.focusActiveEditorGroup", 
        "when": "terminalFocus" 
    },
    {
        "key": "ctrl+l",
        "command": "extension.vim_navigateRight",
        "when": "vim.active && vim.use<C-w>",
    }

(I got this from https://github.com/VSCodeVim/Vim/issues/2092)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't exit from reading Terminals since 1.3 : r/cyberpunkgame
I can't exit terminals since 1.3, exit option has no key or controller assigned.. only scroll message and chose.. anyone have a workaround>....
Read more >
Exit from Terminal mode in Neovim/Vim 8
Type exit into the terminal to kill it and it should close.
Read more >
What's the shortcut to hide the integrated terminal in visual ...
1 on windows, Ctrl/Cmd + J toggles the panel view. You can look up the default keybinding for your OS by opening the...
Read more >
Keyboard shortcuts in Terminal on Mac - Apple Support
Work with Terminal windows and tabs ; Close split pane. Shift-Command-D ; Close tab. Command-W ; Close window. Shift-Command-W ; Close other tabs....
Read more >
Integrated Terminal in Visual Studio Code
Use the Ctrl+` keyboard shortcut to toggle the terminal panel. · Use the Ctrl+Shift+` keyboard shortcut to create a new terminal. · Use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found