vim-vsnip icon indicating copy to clipboard operation
vim-vsnip copied to clipboard

Is there a way to list all the available snippets?

Open navxio opened this issue 3 years ago • 1 comments

for the given file type of course

navxio avatar Jul 03 '21 13:07 navxio

Have a look at https://github.com/hrsh7th/vim-vsnip/blob/b05641ca8c7ebd396017121219047c480182a743/autoload/vsnip.vim#L128-L144

The code calls vsnip#source#find(bufnr('%')) to get all snippets from all sources for the current buffer (`bufnr('%')). It returns a list of list of snipped (ie [ [ snip, snip], [snip, ...] ]) and each snippet is a dictionary matching the JSON

felixr avatar Oct 04 '21 21:10 felixr