Home Download Buy Blog Forum Support

TemplateNinja [Alpha]

TemplateNinja [Alpha]

Postby xamado on Mon Jan 28, 2013 6:14 am

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:
https://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!
xamado
 
Posts: 2
Joined: Mon Jan 28, 2013 6:07 am

Re: TemplateNinja [Alpha]

Postby Uriziel01 on Tue Jan 29, 2013 11:11 am

Any ideas on fixing that:

Code: Select all
Reloading plugin C:\Users\Pawel\AppData\Roaming\Sublime Text 2\Packages\templateninja\TemplateNinja.py
__main__:27: DeprecationWarning: The xmllib module is obsolete.  Use xml.sax instead.
found 14 files for base name Default.sublime-keymap
i: 0, text: <?php
i: 1, text: /*=============
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 339, in run_
  File ".\TemplateNinja.py", line 22, in run
  File ".\TemplateNinja.py", line 39, in show_directory_selection
  File ".\os.py", line 276, in walk
TypeError: coercing to Unicode: need string or buffer, NoneType found
Uriziel01
 
Posts: 3
Joined: Sun Feb 19, 2012 5:42 am

Re: TemplateNinja [Alpha]

Postby xamado on Tue Jan 29, 2013 5:56 pm

Hey there,

Do you have a project created? Or are you using just opened files or opened folders?

There's some things about folders that I still need to figure out how they work in ST2.
xamado
 
Posts: 2
Joined: Mon Jan 28, 2013 6:07 am


Return to Plugin Announcements

Who is online

Users browsing this forum: Clams and 11 guests