SirVer / ultisnips

UltiSnips - The ultimate snippet solution for Vim. Send pull requests to SirVer/ultisnips!
GNU General Public License v3.0
7.55k stars 691 forks source link

if expand fails, the trigger key is inserted #1523

Open liushapku opened 1 year ago

liushapku commented 1 year ago

I use <a-;> as a trigger key. If the expansion is failed, a string show as "<t_u;" is inserted. I digged into the code, and see the following lines of code passes the trigger key to vim

https://github.com/SirVer/ultisnips/blob/0ad238b1910d447476b2d98f593322c1cdb71285/pythonx/UltiSnips/snippet_manager.py#L198

resulting a sequence of keys \<a-;> feed into the insert mode, just like :call feedkey("i\<a-;>")

This behavior is unwanted. Please allow us to costomzie whether the trigger key should be passed through on failure, or set it to "False"

pilgrimlyieu commented 1 year ago

I agree so I have commented this part of codes.