Skip to content

Add option to ignore regions #2038

@dalcde

Description

@dalcde

Is your feature request related to a problem? Please describe it.
If catcodes of characters are modified, then the syntax highlighter gets confused and can potentially mis-highlight the rest of the document. For example, the snippet

\catcode`\$=11
$
\catcode`\$=3

will cause the rest of the document to be treated as being in math mode.

Describe the solution you'd like
A simple way to tell vimtex to ignore a region for the purposes of syntax highlighting. This can be triggered via comments and implemented in the same way as verbatim environments.

Describe alternatives you've considered
Correctly parsing the snippet will likely require reimplementing a good part of a TeX engine.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions