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

Works great, but... #9

Closed zQueal closed 11 years ago

zQueal commented 11 years ago

I really dislike the C# style syntax, it's shotty and unprofessional. I really wanted to be able to use this plugin to tidy outdated php code to Python style to be able to convert and read it very easily. Any chances of seeing an update to allow it?

C# Style:

<?php
function myFunction() 
{
    echo "This is just a test";
}
?>

Python Style:

<?php
function myFunction(){
    echo "This is just a test";
}
?>

Not much of a difference to people, but when you're working with 10k lines of code, it makes a HUGE difference.

DanielSmedegaardBuus commented 11 years ago

Something must be wrong with your installation, because PhpTidy will change any C-style brackets to PHP-style brackets, exactly as you want. If I run PhpTidy on a file with your C# example, it'll move the bracket up to the end of the previous line.

zQueal commented 11 years ago

This isn't an issue. This was caused because I'm an idiot and didn't read the console output for errors. PHP was not added to my $PATH on my Windows 7 non-development machine.

Fixed.