Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you add ultisnips? #59

Open
rickalex21 opened this issue Apr 4, 2021 · 2 comments
Open

Can you add ultisnips? #59

rickalex21 opened this issue Apr 4, 2021 · 2 comments

Comments

@rickalex21
Copy link

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	
@UltiRequiem
Copy link

UltiRequiem commented May 20, 2021

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

@rickalex21
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants