snippet-generator icon indicating copy to clipboard operation
snippet-generator copied to clipboard

Can you add ultisnips?

Open rickalex21 opened this issue 3 years ago • 2 comments

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	

rickalex21 avatar Apr 04 '21 01:04 rickalex21

It would be cool. But you can use something like https://github.com/VincentCordobes/convert-snippets

UltiRequiem avatar May 20 '21 15:05 UltiRequiem

@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.

rickalex21 avatar May 20 '21 20:05 rickalex21