+4

Code in shippets

macourteau 12 років тому оновлено FichteFoll 12 років тому 2
A feature I love in TextMate and that I really miss in Sublime Text is the ability to run code inside snippets. TextMate implements that with backticks, and anything between backticks is executed as shell code, and the output gets inserted at that point in the snippet.

I would really love to be able to do something similar (doesn't have to be shell code, could be e.g. Python), and use the output inside snippets.
Check out my plugin SMART-Snippets.  It aims to add just this.

I haven't worked on it in a while become it hasn't gotten much interest and I have some more important projects but if you're willing to give it a try, I need some testers (preferably people with python experience who are willing to help out)

+1

 The plugin looks good. However, this does not really allow adding a snipped to a package because the target machine would need your plugin installed as well and I hate plugin dependencies (well, everyone should).


I'd also like to be able to call `uuid.uuid4()` inside a snippet. Would allow me to actually create a snippet and not a plugin that does this.