The documentation of Latex-Suite says I can customize the generated environment boilerplates by defining g:Tex_Env_... variables. This works for me. Nevertheless, it goes on to say that for environment names containing special characters I have to use a special syntax. An explicit example for align* is given here as

let g:Tex_Env_{'align*'} = "\\begin{align*}\<CR><++> &= <++>\<CR>\\end{align*}<++>"

But if I try this, copied verbatim, vim complains:

E461: Illegal variable name: Tex_Env_align*

I suppose the documentation contains an error, or was written for a different version of vim (I'm using 8.2.343). What syntax should I use instead?


This sent me on quite the archeological mission...

It turns out this syntax worked on Vim 6.3.82 (from CentOS 4) but didn't work anymore on Vim 7.0.237 (from CentOS 5.)

The commits that introduced the feature and documented it in vim-latex are from September 2003, which is around the time of Vim 6. (Vim 6 was released on September 2001 and Vim 7 on May 2006.)

It looks like this is not a very popular feature... Or it's mostly used with rules other than align* which cause the invalid variable name.

This was clearly developed before Vim had dicts, since dicts are a way more appropriate way to store this information.

  • 2
    Filed Issue #172 on vim-latex GitHub about this. – filbranden Apr 5 '20 at 18:24
  • 1
    Excellent, thank you for filing the issue! I will follow that. – The Vee Apr 6 '20 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.