Skip to content

Conversation

@eduardoarandah
Copy link

Using luasnips functions directly feel like a job for a compiler 😅

image

We are all super busy and lazy, that's why I've added a quickstart so luasnips can be used just as easy as textmate!

For example, adding [==========[ makes it super easy for the eyes to locate the "template"

easy-for-the-eyes.mp4

I also added two commands:

  • EditLuasnipSnippets to quickly jump to your luasnip snippets
  • PasteAsLuasnipSnippet to paste your clipboard content as a snippet (escaping { } signs as {{ }})

See them in action:

create-snippets.mp4

@eduardoarandah
Copy link
Author

For reference: vscode snippets are ugly, I don't feel like creating anything in that format:

image

textmate is super easy! however it's impossible to use functions

image

This is art

image

@L3MON4D3
Copy link
Owner

Hi :)

While this certainly looks useful for quickly creating snippets (and I agree that luasnips native syntax can be pretty tough :D), I feel like it's a bit too opinionated to put in the Readme.
Have you considered adding it to the wiki? That feels like a perfect place for recommendations like this :)

@eduardoarandah
Copy link
Author

Yeah, that’s the idea, one can only have opinions after having experience which is hard as a newbie.

May I suggest adding your opinionated examples instead? 😄 for simple stuff. Text and placeholder.

My experience with luasnips was that at the beginning all I wanted was simple text with simple placeholders. I found only complex examples so I started using snipmate format.

A thousand snippets after, I found that I could get that level of simplicity with luasnips, but it’s now too late 😄 my snippets folder is chaos

and yeah. I will submit my examples to the wiki

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

Successfully merging this pull request may close these issues.

2 participants