VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.84k stars 1.31k forks source link

<C-w> + v and <C-w> + s split pane not working on VSCode 1.90 #9061

Closed ljones140 closed 3 months ago

ljones140 commented 4 months ago

Describe the bug

Using <C-w> + v an + s` for new panes are no longer working when on latest version of VSCode 1.90 https://code.visualstudio.com/updates/v1_90

To Reproduce Steps to reproduce the behavior:

  1. Ensure VSCode is version 1.90
  2. on a file press <C-w> followed by v or <C-w> followed by s

Expected behavior New pane opens

Environment (please complete the following information):

ljones140 commented 4 months ago

Downgrading to VSCode 1.89.1 and split panes works

levidavidmurray commented 4 months ago

I didn't realize my VSCode updated and thought I was going crazy when <C-w> + v wasn't working. Hopefully we can get a quick resolution for this

levidavidmurray commented 4 months ago

Seems like this is due to some changes made for the new "Tab Multi Select" feature

I noticed that resourceOrContext and commandContext were undefined when the action was run via Command Palette > Split Editor. When run via VSCodeVim, they were both empty objects.

split-editor

Setting workbench.action.splitEditor and workbench.action.splitEditorOrthogonal action arguments to undefined seems to fix the immediate issue. But, I don't know enough about the architecture of VSCodeVim nor VSCode to say if this is the correct solution.

https://github.com/VSCodeVim/Vim/assets/46084870/12f4294f-b23f-42a5-9797-7cf1313b3cff

sasacocic commented 4 months ago

I'm having similar issues

<C-w> + v- vertical split

and

<C-w> + s - horizontal split

Are no longer working for me after updating to 1.90.0 of visual studio code

david-xorcon commented 4 months ago

Same here - broken since 1.90.0

Yin-SHT commented 4 months ago

Same here

ljones140 commented 4 months ago

I'm having similar issues

<C-w> + v- vertical split

and

<C-w> + s - horizontal split

Are no longer working for me after updating to 1.90.0 of visual studio code

I'll edit the issue to add these thanks

kianryan commented 4 months ago

This wasn't broken on insiders until the latest update. Now broken on 1.91.0-insider - same behaviour

viddo commented 4 months ago

At least for vertical/horizontal splits one can one can add the following shortcuts to keybinding.json as a temporary workaround, I guess:

    {
        "key": "ctrl+w v",
        "command": "workbench.action.splitEditor"
    },
    {
        "key": "ctrl+w s",
        "command": "workbench.action.splitEditorDown"
    },
dim-an commented 4 months ago

Another possible workaround is to modify vim extension settings:

{
    ...
    "vim.normalModeKeyBindings": [
        {
            "before": ["C-w", "v"],
            "after": [":", "v", "s", "<Enter>"],
        },
        {
            "before": ["C-w", "s"],
            "after": [":", "s", "p", "<Enter>"],
        },
    ...
}

I like it better than modifying keybinding.json because it doesn't break Ctrl+W behaviour in insert mode.

basictheprogram commented 3 months ago

Adding same behavior for menu options

jayhanjaelee commented 3 months ago

Same Here

viddo commented 3 months ago

Another possible workaround is to modify vim extension settings:

{
    ...
    "vim.normalModeKeyBindings": [
        {
            "before": ["C-w", "v"],
            "after": [":", "v", "s", "<Enter>"],
        },
        {
            "before": ["C-w", "s"],
            "after": [":", "s", "p", "<Enter>"],
        },
    ...
}

I like it better than modifying keybinding.json because it doesn't break Ctrl+W behaviour in insert mode.

This workaround works in stable / 1.19.0 but not in insiders version 1.91.0-insider, so there's probably more changes ahead that will break it again.

aurum77 commented 3 months ago

At least for vertical/horizontal splits one can one can add the following shortcuts to keybinding.json as a temporary workaround, I guess:

    {
        "key": "ctrl+w v",
        "command": "workbench.action.splitEditor"
    },
    {
        "key": "ctrl+w s",
        "command": "workbench.action.splitEditorDown"
    },

here's that but for config json

"vim.normalModeKeyBindings": [
    {
      "before": [
        "<C-w>",
        "v"
      ],
      "commands": [
        "workbench.action.splitEditor"
      ]
    },
    {
      "before": [
        "<C-w>",
        "s"
      ],
      "commands": [
        "workbench.action.splitEditorDown"
      ]
    },
]
guunergooner commented 3 months ago

At least for vertical/horizontal splits one can one can add the following shortcuts to keybinding.json as a temporary workaround, I guess:

    {
        "key": "ctrl+w v",
        "command": "workbench.action.splitEditor"
    },
    {
        "key": "ctrl+w s",
        "command": "workbench.action.splitEditorDown"
    },

here's that but for config json

"vim.normalModeKeyBindings": [
    {
      "before": [
        "<C-w>",
        "v"
      ],
      "commands": [
        "workbench.action.splitEditor"
      ]
    },
    {
      "before": [
        "<C-w>",
        "s"
      ],
      "commands": [
        "workbench.action.splitEditorDown"
      ]
    },
]

👍 Cool, add this configuration code snippet to setting.json to bypass the above issue.

cochranjdlz commented 3 months ago

For anyone interested, I was able to additionally add the following config to allow me to regain my keyboard navigation, which also broke when I updated.

  {
    "key": "ctrl+w k",
    "command": "workbench.action.navigateUp"
  },
  {
    "key": "ctrl+w j",
    "command": "workbench.action.navigateDown"
  },
  {
    "key": "ctrl+w h",
    "command": "workbench.action.navigateLeft"
  },
  {
    "key": "ctrl+w l",
    "command": "workbench.action.navigateRight"
  },

In my case, I'm used to using <C-k>, <C-l>, <C-j>, <C-h.

junhan-z commented 3 months ago

Same here.

Also I think ctrl+w o (show current panel and close others) and ctrl+w q (close current panel) are also broken.

fivetran-danandreiganea commented 3 months ago

Same here

CWEzio commented 3 months ago

Same problem

jakyns commented 3 months ago

when will this fix?

jirol9xa commented 3 months ago

same

laipz8200 commented 3 months ago

Same here

basictheprogram commented 3 months ago

Still have the problem in 1.90.2 on macOS

KuanYuLai commented 3 months ago

same

jakyns commented 3 months ago

how can we push this to fix as soon as possible?

cloone8 commented 3 months ago

Same problem here! Would be great to have this fixed instead of having to use a workaround. Wish I could do this myself, but I haven't got the time to dive into a new open source project atm.

bluddy commented 2 months ago

Would be nice to have a release for this fix.

KholdStare commented 1 month ago

@J-Fields Can this fix be released? I still need to keep resetting VSCode to an older version. Thank you!