snippet-generator
snippet-generator copied to clipboard
Can you add ultisnips?
I know this would be hard because of the interpolation, but you can just ignore stuff with backticks and anything
that has a regex trigger. Just implement the basic stuff like this.
Snippet Generator
substitute($1,'\v^$2','$3','${4:g}')$0
VSCODE
"substitute function": {
"prefix": "sub",
"body": [
"substitute($1,'\\v^$2','$3','${4:g}')$0"
],
"description": "substitute function"
}
Ultisnips
snippet sub "substitute function"
substitute($1,'\v^$2','$3','$4')$0
endsnippet
It would be cool. But you can use something like https://github.com/VincentCordobes/convert-snippets
@UltiRequiem Thanks I'll check it out. Actually I was thinking about this issue yesterday. I know this may sound crazy but I was thinking one universal snippet written in yaml or json and parse it to whatever. This would be a great engine for the snippet generator. Kinda like a syntax tree similar to pandoc or tree sitter but that would probably be overkill. For now just sticking to ulitsnips and vscode but I've heard of others like vsnip.