garbas / vim-snipmate

snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim.
www.vim.org/scripts/script.php?script_id=2540
2.01k stars 181 forks source link

Single Session (or buffer) snippets #259

Open mraaroncruz opened 7 years ago

mraaroncruz commented 7 years ago

I looked through the issues to see if this was possible and couldn't find anything. I found a blog post with a similar idea.

The problem is that sometimes I have one off repetitive things I have to do that would work wonderfully with a snippet but not so great with q. These things are very specific to a buffer, session or project so I wouldn't want them globally, and most of the time not even session or project local. For example, I have a template that has a helper function that takes a string and it is used over and over again. I could save a process in q and make it mostly work, but it's super tedious and snippets would be a much nicer solution.

Is there a way to define a snippet in the : menu? Can you point me to the docs if yes.

Thank you!

ajzafar commented 7 years ago

This sounds like the anonymous snippets that UltiSnips provides. I think it's a good idea. It's just a matter of me finding time, unfortunately. There are a few bigger, more impactful ideas I'd like to implement first though.

mraaroncruz commented 7 years ago

Cool. I'll take a look. I've been using snipmate for years, probably 100 times a day. Thank you very much for maintaining this. And for the super quick response!

ajzafar commented 7 years ago

I'd actually prefer to leave this open to remind me to work on this later.