Skip to content

Activating extension 'vscodevim.vim' failed: Invalid regular expression #3522

@tetchel

Description

@tetchel

Describe the bug
When I launch VS Code in Extension Development Host mode, I get an error popup (newlines added by me) saying the following:

Activating extension 'vscodevim.vim' failed: Invalid regular expression: 
/([^\s`~!@#\$%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>/\?](?:(?:(?<=[A-Z_])[A-Z](?=[\sA-Z0-9`~!@#\$%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>/\?_]))+|(?:(?<=[0-9_])[0-9](?=[\sA-Z0-9`~!@#\$%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>/\?_]))+|(?:(?<=[_])[_](?=[\s`~!@#\$%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>/\?_]))+|[^\sA-Z0-9`~!@#\$%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>/\?_]*))|[`~!@#\$%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>/\?]+|$^/: 
Invalid group.

My condolences to whoever has to work on anything to do with that regex 😨!

To Reproduce

  1. Launch VS Code in Extension Development Host mode.
  2. That's it, the error appears every time.

I can't get the error to pop up when not using Extension Development Host mode. In addition, I tried launching the EDH with two different extensions I work on, and both had the same activation failure message appear, so I don't think it's related to either of my extensions.

Expected behavior
I expect the extension to activate without failing :P

Screenshots
image

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.1.0
  • VSCode version: 1.30.2
  • OS: MacOS Mojave

Additional context
I just started noticing this error today. I have been using your extension to develop my own extension for ~6 months so this seems to be a new issue.

Here are my settings, they haven't changed in a long time though so I don't think they are the cause.

"vim.insertModeKeyBindings": [
        {
            "before": ["j", "j"],
            "after": ["<Esc>"]
        },
        {
            "before": [ "<Up>" ],
            "after": [ "<Noop>" ]
        },
        {
            "before": [ "<Down>" ],
            "after": [ "<Noop>" ]
        },
        {
            "before": [ "<Left>" ],
            "after": [ "<Noop>" ]
        },
        {
            "before": [ "<Right>" ],
            "after": [ "<Noop>" ]
        },
    ],
    "vim.normalModeKeyBindings": [
        {
            "before": [ "h" ],
            "after": [ "<Noop>" ]
        },
        {
            "before": [ ";" ],
            "after": [ "l" ]
        },
        {
            "before": [ "l" ],
            "after": [ "h" ]
        },
        {
            "before": [ "<Up>" ],
            "after": [ "<Noop>" ]
        },
        {
            "before": [ "<Down>" ],
            "after": [ "<Noop>" ]
        },
        {
            "before": [ "<Left>" ],
            "after": [ "<Noop>" ]
        },
        {
            "before": [ "<Right>" ],
            "after": [ "<Noop>" ]
        },
        {
            "before": [ "u" ],
            "after": [ "<Noop>" ]
        }
    ],

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions