-
-
Notifications
You must be signed in to change notification settings - Fork 257
Description
Hello, first of all, thanks for the most impressive snippet engine I ever used, period.
I may be wrong, but I think I noticed an undocumented (and for me unexpected) behavior.
It seems that the rep node is skipt in the node count. So, to give you an example, this snippet is correct:
s({ trig = "test", dscr = "just a test" }, fmt("{} {} {}", { i(1, "x"), rep(1), i(2, "y") })),
Note that, despite being three nodes, and 3 items in the list the last insert node must refer to the 2
position. While it can make sense if you know it, this is a bit confusing and I think it should at least be documented.
It becomes even weirder when you put it in first place, because you say it should repeat the first node, then the next is the first node, and it seems to produce very strange behaviours too:
s( "test", fmt("{} {} {}", { rep(1), i(1, "x"), i(2, "y") })),
For example, for some reason it exits my insert mode, so the next thing I type is often interpreted as a vim command, however this is not always the case, and not all keys behaves like this, very strange...