Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabstops not working properly with delimiters #1566

Open
Hyrhie opened this issue Mar 8, 2025 · 1 comment
Open

Tabstops not working properly with delimiters #1566

Hyrhie opened this issue Mar 8, 2025 · 1 comment
Labels
pending feedback triaged Bugs that I had a look at

Comments

@Hyrhie
Copy link

Hyrhie commented Mar 8, 2025

Tabstops are not working properly when using snippets with delimiters. For example, if I have something of the kind

snippet _ "subscript" iA
_{$1}$0
endsnippet

it should first expand like {|} (here I'm using | to denote the cursor place) and then go to the second tabstop, like {}|. But for some reason, sometimes, even after pressing the next tabstop trigger (which I've set to jk) the cursor just blinks and stays right before the end of the delimiter (for example, after A_{1} it would stay like A_{1|} instead of A_{1}|).

When I say "sometimes" I mean it. This behavior triggers for some reason and after that all the snippets with delimiters stop working properly. And then it randomly starts working fine again. I can't get what triggers the behavior though.

Furthermore, it apparently is not bounded to happen just with {}. Something of the kind

snippet mk "inline math" wA
\$ $1 \$$0
endsnippet

is also not working properly.

Does someone have any idea about what's happening?

@SirVer
Copy link
Owner

SirVer commented Mar 9, 2025

It is likely a race condition in the internals of Vim. It would help if you could please provide a fully reproducible example, ideally using the approach explained in https://github.com/SirVer/ultisnips/blob/master/CONTRIBUTING.md#reproducing-bugs or if not possible with a minimal vimrc and snippets files and an exact sequence of key strokes that trigger the bug.

@SirVer SirVer added pending feedback triaged Bugs that I had a look at labels Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending feedback triaged Bugs that I had a look at
Projects
None yet
Development

No branches or pull requests

2 participants