welovewordpress / SublimePhpTidy

Plugin for Sublime Text 2 to format PHP code to meet the WordPress Coding Standards using a modified version of phptidy
GNU General Public License v2.0
109 stars 30 forks source link

Add support for other php files / extensions #5

Closed AlexAndrascu closed 12 years ago

AlexAndrascu commented 12 years ago

Thanks for a very usefull plugin.

If you can add suport for other known php extensions that would be awsome.

Currently i've modified the php_tidy.py around line 9

if FILE[-3:] == 'php' or 'module' or 'inc':

But i'm sure there's a better logic then using FILE variable.

welovewordpress commented 12 years ago

I've just included your patch for now.

I'm no python expert but if someone comes around with a better way to check if the file is php, let me know.

AlexAndrascu commented 12 years ago

Thanks!

welovewordpress commented 12 years ago

Thanks @sc0tt you're great!