Hey guys, I’m new here and I’ve been only using ST2 for 2 days, but I wanted to share my first plugin with you. It’s probablly still full of bugs that I’m gonna be sorting through, and it’s still missing a couple of features that I want to implement, but I’m already using it myself.
TemplateNinja is a combination of both a “quick new file” style plugin (with directory selection in the quick panel, enabling quick fuzzy searching of those nasty long namespace paths) and “snippets”, although it requires it’s own files (mostly for additional metadata) but these template files are basically snippets, so it has all the goodies of being a snippet.
If you already have several snippets that you use to populate empty files, converting these to templates is pretty easy (info on github).
The main reason that motivated me to do this was that PHP files when created have a default scope of text.html, it’s not until that you type both the open and close tags <?php ?> that you can actually use a php snippet to create an empty class (I’m now using several templates for working with Symfony2), so I wanted to make something that created a new file and added a template, and well, then I started adding more features like the directory browser, exclusion dirs and the ones I’m still working on (project based tags for filtering templates is one).
Here’s the github repo:
github.com/xamado/sublime-templateninja
Any feedback, bug reports, and suggestions are more than welcome, and also your own templates if you want to bother sending them my way
Thanks for your time!