coc-snippets icon indicating copy to clipboard operation
coc-snippets copied to clipboard

Snippet 'fori' cannot jump to the `type` placeholder

Open liuyehcf opened this issue 1 year ago • 4 comments

snippet fori is like this:

    for (int i = 0; i < count; i++) {

    }

It has four placeholders, which respectively are count0i++int of the above case.

When I use coc-snippets(3.1.6) to drive the snippet, it only iterate the first 3 placeholders.

And when I change to 'SirVer/ultisnips', it works fine for iterating the 4 placeholders.

And for lower version of coc-snippets, maybe 2.8.x(not for sure, but must be 2.x), it also works fine.

liuyehcf avatar Aug 20 '23 01:08 liuyehcf

Which language? can you post the snippet file?

fannheyward avatar Aug 21 '23 06:08 fannheyward

Please provide the snippet definition.

chemzqm avatar Sep 05 '23 15:09 chemzqm

provided by vim-snippets

## Iteration
# for i
snippet fori
	for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {
		${4}
	}

liuyehcf avatar Oct 11 '23 09:10 liuyehcf

Tested this snippet in cpp file, jumping follows the count - i - ++ - body placeholder, the 4th.

coc-snippets 3.1.10

fannheyward avatar Oct 11 '23 09:10 fannheyward