I use UltiSnips and YCM, which usually works fine. However, I've noticed an issue for autoexpanded snippets. For example, if I have the snippet

snippet beg "begin/end" bA

and then type beg in my document, then I end up with


(Of course, I don't actually see the placeholder $0 and $1, but that's how it functions.)

If I call the same snippet something like hello, then nothing bad happens. If I don't autoexpand, everything also works like it's supposed to. But it seems that as soon as the expanded bit includes the snippet trigger word, YCM causes the autoexpansion to break. (I know it's due to YCM since disabling YCM makes everything work fine.)

Does anyone know how I can fix this?

(reposted from stack overflow: https://stackoverflow.com/questions/66216330/ultisnips-autoexpansion-doesnt-work-with-youcompleteme)

UPDATE: I have done some testing and have figured out that calling the error something different doesn't change the results. Instead, it seems that the problem comes from using placeholders (like $1) within curly braces.

  • 1
    If you are sure it's because of ycm and you can't find anything related to this behavior in the help page you should consider asking the question on their issue tracker the people over there will have a more in-depth understanding of the plugin and maybe will already know about the issue, they'll probably give you a better answer than here.
    – statox
    Feb 18, 2021 at 11:23
  • @statox Thanks, for some reason I didn't think to check the issue tracker! But it turns out that this is already discussed on the UltiSnips page: github.com/SirVer/ultisnips/issues/1234.
    – boink
    Feb 18, 2021 at 18:29
  • 1
    If you want you can answer your question explaining that it is a known bug and marking the answer as accepted this way if future reader come with the same problem they'll know it's being worked on.
    – statox
    Feb 18, 2021 at 19:35

1 Answer 1


As mentioned in the comments, this is a known bug with UltiSnips

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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