Open kkew3 opened 1 month ago
It seems that under vim 9, set nocompatible
needs be added to vimrc to reproduce the issue, whereas under vim 8 (in the docker environment), it's not necessary. That's why I didn't include this line in https://github.com/kkew3/ultisnips-issue1/blob/issue/docker/docker_vimrc.vim.
This issue is related to #1519, but in a reproducible way.
In my context, I collect all math-related snippets in a file called
tex_math.snippets
, and I have atex.snippets
with content:The issue occurs when I type any snippet in a
a.tex
file that is defined intex_math.snippets
, something like:The cause of the issue is that according to UltiSnips doc (section UltiSnips-how-snippets-are-loaded), both
tex_math.snippets
andtex.snippets
refer to snippets oftex
filetype. Thus, by extendingtex_math.snippets
intex.snippets
, it might somehow trigger certain naming conflicts and causes any snippet defined intex_math.snippets
to be redefined. Interestingly, usingextends tex
rather thanextends tex_math
intex.snippets
won't trigger the issue.Expected behavior:
Either error out, suggesting the user
extends tex_math
is an improper use ofextends
keyword, or behave as if theextends tex_math
intex.snippets
is not present. In the latter case, all definitions intex_math.snippets
take effect in aa.tex
file automatically, by definition.Actual behavior:
As mentioned above, something like
is prompted, and the user must enter, e.g.
1<ENTER>
, to select one, which IMHO is confusing and misleading.Steps to reproduce
In the docker container:
vim x.tex
frac<TAB>
py:
py3: