VSCodeVim / Vim

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

Failed to handle key `,`: argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true #7296

Open wunoman opened 2 years ago

wunoman commented 2 years ago

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

VSCodeVim version: 1.21.10

Stack trace ``` Error: argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true at r (vscode-file://vscode-app/d:/devtool/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:76:5236) at o (vscode-file://vscode-app/d:/devtool/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:76:4963) at y.handler (vscode-file://vscode-app/d:/devtool/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:597:18838) at h.invokeFunction (vscode-file://vscode-app/d:/devtool/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:599:319) at h._tryExecuteCommand (vscode-file://vscode-app/d:/devtool/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:1501:3496) at vscode-file://vscode-app/d:/devtool/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:1501:3245 at processTicksAndRejections (internal/process/task_queues.js:93:5) ```
wunoman commented 2 years ago
"vim.normalModeKeyBindings": [
    {
        "before":[",",","], "commands":["editor.fold"],
    },

] when I map key try to fold code, raise error, but another map ok. "vim.normalModeKeyBindings": [ { "before":[",", "s"], "after":[ ":", "w", ""], }, ]

wunoman commented 2 years ago

use these all fine. { "before":["g","["], "commands":["editor.toggleFold"], }, { "before":["g","]"], "commands":["editor.unfoldAll"], },