Vim icon indicating copy to clipboard operation
Vim copied to clipboard

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

Open ljones140 opened this issue 1 year ago • 26 comments
trafficstars

Describe the bug

Using <C-w> + v an <C-w> + 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):

  • Extension (VsCodeVim) version: 1.27.3
  • VSCode version: 1.90
  • OS: Mac 14.5

ljones140 avatar Jun 06 '24 15:06 ljones140

Downgrading to VSCode 1.89.1 and split panes works

ljones140 avatar Jun 06 '24 15:06 ljones140

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 avatar Jun 06 '24 20:06 levidavidmurray

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

levidavidmurray avatar Jun 06 '24 23:06 levidavidmurray

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

sasacocic avatar Jun 07 '24 00:06 sasacocic

Same here - broken since 1.90.0

david-xorcon avatar Jun 07 '24 01:06 david-xorcon

Same here

Yin-SHT avatar Jun 07 '24 02:06 Yin-SHT

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

ljones140 avatar Jun 07 '24 08:06 ljones140

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

kianryan avatar Jun 07 '24 12:06 kianryan

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"
    },

viddo avatar Jun 07 '24 13:06 viddo

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.

dim-an avatar Jun 07 '24 14:06 dim-an

Adding same behavior for menu options

  • View > Editor Layout > Split Down
  • View > Editor Layout > Split Up

basictheprogram avatar Jun 09 '24 13:06 basictheprogram

Same Here

jayhanjaelee avatar Jun 10 '24 04:06 jayhanjaelee

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.

viddo avatar Jun 10 '24 06:06 viddo

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"
      ]
    },
]

aurum77 avatar Jun 10 '24 18:06 aurum77

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.

guunergooner avatar Jun 13 '24 14:06 guunergooner

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.

cochranjdlz avatar Jun 14 '24 16:06 cochranjdlz

Same here.

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

junhan-z avatar Jun 16 '24 05:06 junhan-z

Same here

fivetran-danandreiganea avatar Jun 17 '24 06:06 fivetran-danandreiganea

Same problem

CWEzio avatar Jun 20 '24 11:06 CWEzio

when will this fix?

jakyns avatar Jun 20 '24 14:06 jakyns

same

jirol9xa avatar Jun 23 '24 09:06 jirol9xa

Same here

laipz8200 avatar Jun 23 '24 09:06 laipz8200

Still have the problem in 1.90.2 on macOS

basictheprogram avatar Jun 24 '24 14:06 basictheprogram

same

KuanYuLai avatar Jun 28 '24 07:06 KuanYuLai

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

jakyns avatar Jun 29 '24 05:06 jakyns

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.

cloone8 avatar Jun 29 '24 09:06 cloone8

Would be nice to have a release for this fix.

bluddy avatar Jul 17 '24 08:07 bluddy

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

KholdStare avatar Aug 16 '24 21:08 KholdStare