Skip to content

Problem with g:vimtex_syntax_alpha #1809

@jubnzv

Description

@jubnzv

Hi,

I found a small issue when updating vimtex to the latest version from git master.
It seems that f72642c leads to errors at startup.

Here are the error messages that appears when starting vim:

Error detected while processing /home/jubnzv/.local/share/nvim/plugged/vimtex/syntax/tex.vim:             
line   23:                                                                                                
E121: Undefined variable: g:vimtex_syntax_alpha                                                           
E15: Invalid expression: exists('b:current_syntax') || !g:vimtex_syntax_alpha                             
Error detected while processing /home/jubnzv/.local/share/nvim/plugged/vimtex/after/syntax/tex.vim:       
line    7:                                                                                                
E121: Undefined variable: g:vimtex_syntax_alpha                                                           
E15: Invalid expression: !g:vimtex_syntax_alpha   

It seems that the problem in the global variable g:vimtex_syntax_alpha.

If we replace g:vimtex_syntax_alpha to get(g:, 'vimtex_syntax_alpha') here and here, the plugin works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions