When typing too fast, some snippets which should expand automatically do not.
Expected behavior:
Have all automatic snippets expanded.
Actual behavior:
Some snippets are not expanded.
Steps to reproduce
Use the following snippet for .tex files:
snippet ( "" iA
\left(
endsnippet
Keep the key "(" pressed.
After some time, we start seeing things like "\left( (\left( ", whereas it should be "\left( \left( \left( ".
Note that you might need to have a rather long line before starting seeing the problem.
More information:
I found that when the line I am writing is very small, this problem does not occur often, but the longer the line the more I see it. I have also noticed that the size of the document I am writing and the number of my snippets are other factors which make this problem worse. Also. strangely enough, it also depends on the file extension: the problem needs a much shorter line to appear in a .tex file than in a .txt one (maybe because of syntax colouring?).
All this makes me think that UltiSnips takes too much time to process a key press, and then, when it looks at what was typed since the last update, it skips (voluntarily or not) some key presses. I don't really care if what is on my screen is not exactly up to date with everything I type, as long as, in the end, all text is here and all my snippets are expanded correctly (especially for the ones which should be automatically expanded).
I think that a key buffer could solve my problem. It didn't feel so when I browsed on the internet and through the documentation, but could there be an option in UltiSnips which I am missing? I also think that, if this behaviour is expected (as a tradeoff for speed), I could maybe use a Vim plugin or an external application which would record all my keypresses in a buffer, and give them to UltiSnips or Vim with a minimum time between two key presses; would you have an idea of a tool which could do that (and do you think it could work)?
When typing too fast, some snippets which should expand automatically do not.
Expected behavior: Have all automatic snippets expanded.
Actual behavior: Some snippets are not expanded.
Steps to reproduce
Note that you might need to have a rather long line before starting seeing the problem.
More information: I found that when the line I am writing is very small, this problem does not occur often, but the longer the line the more I see it. I have also noticed that the size of the document I am writing and the number of my snippets are other factors which make this problem worse. Also. strangely enough, it also depends on the file extension: the problem needs a much shorter line to appear in a .tex file than in a .txt one (maybe because of syntax colouring?).
All this makes me think that UltiSnips takes too much time to process a key press, and then, when it looks at what was typed since the last update, it skips (voluntarily or not) some key presses. I don't really care if what is on my screen is not exactly up to date with everything I type, as long as, in the end, all text is here and all my snippets are expanded correctly (especially for the ones which should be automatically expanded).
I think that a key buffer could solve my problem. It didn't feel so when I browsed on the internet and through the documentation, but could there be an option in UltiSnips which I am missing? I also think that, if this behaviour is expected (as a tradeoff for speed), I could maybe use a Vim plugin or an external application which would record all my keypresses in a buffer, and give them to UltiSnips or Vim with a minimum time between two key presses; would you have an idea of a tool which could do that (and do you think it could work)?
Note that this post mirrors a question I asked on the Vim StackExchange, following an advice from Vivian De Smedt.