The issue is that Vim is not reporting what changed in a buffer when the cursor moved. But UltiSnips needs this information to update its text objects. So it first tries a bunch of heuristics to figure this out - e.g. if the cursor is on the next line, but further to the left it is likely that the user inserted a newline. But if those heuristic fail, we need to do a full diff of the snippet area before and after - unfortunately this is a very costly operation and very slow as well (both the implementation and python). This is the notable freeze you see.
Unfortunately I have no idea how to improve the situation - if you have any suggestions, shoot.
Well, this is not related to visual, it is related to big edits inside a snippet. The problem is here:
https:/ /github. com/SirVer/ ultisnips/ blob/master/ plugin/ UltiSnips/ __init_ _.py#L686
The issue is that Vim is not reporting what changed in a buffer when the cursor moved. But UltiSnips needs this information to update its text objects. So it first tries a bunch of heuristics to figure this out - e.g. if the cursor is on the next line, but further to the left it is likely that the user inserted a newline. But if those heuristic fail, we need to do a full diff of the snippet area before and after - unfortunately this is a very costly operation and very slow as well (both the implementation and python). This is the notable freeze you see.
Unfortunately I have no idea how to improve the situation - if you have any suggestions, shoot.