Skip to content

Bug with space in syn region regex #191

Description

@jez

Example

❯ cat foo.vim
syn region foo start=/^ \+\|\tx/ end=/x/

Expected behavior

No parse errors, as this is valid.

Actual behavior:

❯ vint foo.vim
foo.vim:1:29: E10: \\ should be followed by /, ? or & (see vim-jp/vim-vimlparser)

Workaround

Wrap the space before the \t in [ ].

❯ cat foo.vim
syn region foo start=/^[ ]\+\|\tx/ end=/x/

❯ vint foo.vim

❯

Version information

❯ vint --version
0.3.21

❯ vim --version
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by linuxbrew@649894113f22

❯ cat /etc/lsb-release
DISTRIB_ID=Pop
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Pop!_OS 20.04 LTS"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions