Coda PHP & Web Toolkit

  1. Download / Feedback •
  2. Help
  3. Coda Tips

AboutDownloadComments/Feedback

A Coda plugin aimed at PHP & Web development – not in active development.

Current version: 4.1 – Coda 1 and Coda 2

Features

  1. (Automatic) PHP syntax validation with jump to error and auto-save
  2. Clean up/reformat HTML, CSS, Javascript and PHP code (configurable)
  3. HTML, CSS and Javascript validation
  4. Minify Javascript and CSS
  5. Automatic check for updates
  6. It’s free (you can donate of course)

All features use the editor buffer (no need to save first) – Works with local and remote files – Written in Cocoa/ObjC.

General Preferences Preferences for CSS Preferences for Javascript Validation with errors Validation successful

Download

Download Coda PHP & Web Toolkit 4.1 »

Download Coda PHP & Web Toolkit 4.2 beta »

Sourcecode

https://bitbucket.org/mariofischer/php-web-toolkit/


Changelog »

Problems?

First have a look here » – if that doesn’t help, please write a comment below.

Enjoy using this plugin?

Great!
Just leave a comment or donate (via paypal) ».

For German users I can only recommend all-inkl.com (Partnerlink).

Planned Features

  • Apply some functions only to the selected area if desired (DONE – in the current beta)
  • Floating result windows/Growl-like notification/Use Growl (DONE – in the current beta)
  • Switch online validators more easy (DONE – in the current beta)
  • Rewrite curl methods in cocoa
  • Add configuration options for JSTidy
  • Automatically install updates
  • Use Coda 2 API for go to line (DONE – in the current beta)
  • Use Coda 2 API for automatic PHP validation before saving
  • Up next: Minify JS/CSS automatically on publishing
  • CSS minify: Check other minifier
  • Respect spaces per indent (in different cases)
  • PHP tidy: Preserve whitespaces, if possible
  • Minification: Upload .min.css or similar, if possible
  • Check new HTML5 tidy
  • Javascript execution directly via cocoa (improvement necessary)
  • Make PHP tidy more configurable (if possible)

789 Replies to “Coda PHP & Web Toolkit”

  1. Hey,

    Really love the plugin – thank you! Is it possible for it to automatically scroll to the highlighted line when an error is detected?

    Cheers,

    Alex

        1. Unfortunately not with the current Coda-API.

          I already did ask the Panic team about an API update, but didn’t receive a response, I suppose the work on Coda 2.0 is more in the focus currently.

          In the between time: Press cursor left and right to scroll to the focused line.

  2. The file is now broken. The plug-in “PhpPlugin-2” could not be read. Please verify the plug-in’s format or try re-downloading the plug-in from the author’s website.

    Great a few weeks ago when it worked! Thanks.

    1. Hi –

      is now part of the FAQ: http://www.chipwreck.de/blog/software/coda-php/help/#help4.

      The “.codaplugin”-extension is linked to the “Coda Plug-in Creator” – so if you doubleclick a plugin “Coda Plug-in Creator” tries to open it, which goes wrong since the Plugin was developed with Xcode and not the Plugin Creator…

      To install the plugin in Coda do the following:

      Right-click on the “PhpPlugin.codaplugin”-file and choose “Open with…” and select “Coda” (instead of the default entry “Coda Plug-In Creator”).

      (You can also use the information window CMD+I to change the association of .codaplugin-files permanently)

      1. Ah. Cool. Great thanks for the great information and great plug in! If we start using this a lot donation will be on the way.

  3. I’ve just attempted to tidy some horrific coding and your plugin generally does a fine job but I’m getting a few strange patterns:

    Foreach:

    foreach
    ($variable as $foo => $bah)
    {
    //Code;
    }

    If:

    if ($something)
    {
    //Code
    } else
    { //Code; }

    I personally prefer curly brackets under the function but some of this formatting is just a little strange.

  4. Just discovered this wonderful plugin I was curious if there’re any plans to support tidying only selected regions rather than the entire doc? Thanks! :D

  5. Hi,
    thanks for this super great plugin!
    I just have found a mini-bug:
    When I have an umlaut in my comments of an UTF-8 encoded .js, and I run “Tidy JS”, all the umlauts are replaced by strange characters.
    Or do I have to change any preference?
    Thanks again & peace,
    kolt

  6. Fantastic extension, and thank you.

    People obviosuly code (and layout) their code (PHP in my case) in slightly different ways.

    Currently the format of the tidy-er is roughtly:

    function name()
    {
    code
    code
    if {
    code
    code
    }
    code
    }

    is there any config to change it to a vertical brackets format?

    e.g.

    function name()
    {
    code
    code
    if
    {
    code
    code
    }
    }

    Many Thanks

    1. Options would be great especially for bracket placement.
      For example, Matt’s practice above would get him hazed big time if he was writing code that way as one of my developers. I would go so far as to delete the class and say go write it again. The open bracket belongs on the method line not bellow it like so many freaking people think makes their code more readable. :-)

      Aahah, but yea we all do have our own quirks. This is a wonderful addition to Coda for PHP support, and fantastic work brining to us to make our lives just a little bit better everyday. Thank you.

        1. Ahaa… You are awesome! I love your plugin, and actually just used it about 15 minutes ago, followed immediately by my own script to fix the brackets.

          It’s funny how we all turn our little coding habits into religion sometimes. Probably not a good thing.

          1. Thx!

            Well, most developers I know are also “religious” about this or that (I suppose it started with vi vs. emacs).

            For example this looks horribly wrong to me:
            if(condition)...
            It has to be:
            if (condition)...

            But of course, that’s the next discussion :)

  7. Love your plugin in everyway.

    I just have a question that, maybe you already know the answer to that I cannot find anywhere else.

    In your FAQ it outlines that to preserve php inside an attribute you need to use single quotes:

    a href=”

    This is often hard for me, alot of the code I work on has php mixed amungst standar text as an attribute like:

    a href = “/url//var3//”

    I cannot seem to fins a way for it leave these alone, or preserve them. Is there anyway to just totally ignore the contents of HTML attributes.?

    I have been through the Options several times, and tried everything to no avail.

    Any help would be awesome.. Thanks!

    1. Ok, you want to use something like this

      <a href=”<?=$a.’hello’ ?>”>test

      and have problems when using HTMLtidy, right?

      For me the most easy solution would be using usual PHP tags, because this snippet works fine with HTMLtidy..:

      <a href=”<?php echo $a.’hello’ ?>”>test

      ..or I am understanding someting wrong..?

      1. Sorry your comment box stripped out my code, let me try encoding it.

        I am trying to have this type of link be left alone.

        href=”/category/<?=$this_category; ?>/sort.php?attr=<?=$attr; ?>”

        Essentially I have urls

        href = “/location/Var1/var2/”

        Where there are Var1, and var2 would be replaced with individual php tags, and values.

        is there anyway, to just ignore everything between the quotes (“”) for an attribute

        1. I see…

          Well currently it’s only possible by rewriting your code like this:

          href=”<php echo ‘/category/’ ><php echo $this_category’ >…

          (By using php echo instead of short tags *and* by starting the HREF directly with a php-tag)

          This is still an open issue in HTML-tidy, see for example here:

          http://sourceforge.net/tracker/?func=detail&aid=3097596&group_id=27659&atid=390966

          If you know of another HTML tidy/reformat tool (or if I find one), which can be easily integrated, I could of course add another tool, but currently I’m not aware of something similar.

    1. Yes, that’s intended – because the last semicolon is not strictly necessary, and CSStidy is more geared towards compression.

      But you can use proCSSor, which offers more configuration possibilties.

      And I’ll have a look at the CSStidy configuration for the next an upcoming update.

  8. hi there! i’m on version 2.3 and the plugin just notified me of an update and asked to download the latest version. i clicked yes and it DLed and i double-clicked to install, but the version number in the plugin’s about dialog didn’t change. this isn’t the first time this has happened to me with this plugin.

    otherwise, i love this plugin and have been using it since i installed coda at work. thanks for a great product!

    -alex r

    1. Hi –

      thanks for the compliments :)

      I assume this has to do with the website caching.. You can always download the current plugin with the button above.

      One question though: Are there maybe accidentally two versions of the plugin in ~/Library/Application Support/Coda/Plug-ins/?

  9. Just reporting a bug that I get the warning about the LessCSS plugin but do not and never have used it.

    Thanks,
    Doug

    1. Hi –

      okay, so it seems another plugin has the same problem. Could you try and move the plugins you’re using aside? (And tell me which one makes problem).

      Thanks!

        1. Thanks a lot!

          Yes, the warning message comes from my plugin, so the behaviour is correct.

          You can of course use both plugins, but the drawback will be the error message (I’ll update this soon, so it doesn’t appear on every start) – and you can’t use the proCSSor.com webservice.

  10. First, I really appricate this plug-in (it’s the only one I use, but it’s awesome)

    Two bugs:
    First, CSS Tidy is breaking my web fonts:

    It’s taking this:
    @font-face {
    font-family: ‘KomikaTextRegular’;
    src: url(‘KOMTXT__-webfont.eot’);
    src: local(‘☺’), url(‘KOMTXT__-webfont.woff’) format(‘woff’), url(‘KOMTXT__-webfont.ttf’) format(‘truetype’), url(‘KOMTXT__-webfont.svg#webfontg8E6Mgnc’) format(‘svg’);
    font-weight: normal;
    font-style: normal;
    }
    and removing all the apostrophes, turning it into:
    @font-face {
    font-family: KomikaTextRegular;
    src: url(KOMTXT__-webfont.eot);
    src: local(☺), url(KOMTXT__-webfont.woff) format(woff), url(KOMTXT__-webfont.ttf) format(truetype), url(KOMTXT__-webfont.svg#webfontg8E6Mgnc) format(svg);
    font-weight: 400;
    font-style: normal;
    }

    Second, “Format with proCSSor” is failing and throwing this error:
    (NSInvalidArgumentException) -[SBJsonParser objectWithString:error:]: unrecognized selector sent to instance 0xcb0d40

    1. Hi –

      okay, could you tell me the configuration you used (for CSStidy and proCSSor)?

      And please set “Debug mode” on (in the plugin preferences), try proCSSor again and open the Console. There should be a longer entry starting with:

      Coda PHP Toolkit: PHP Toolkit: Curl to http://procssor.com/api

      This entry would also be helpful.

      Thx!

      And: you could try out what the online version of procssor.com does with your CSS – using the same settings. Does it work there?

      1. The configuration was all defaults, and I confirmed again hitting reset to defaults on all the tabs. (Default/New Line Always/Default/Default/check on same line/ check fail-safe mode)

        The online proCSSor leaves the single aphostrophes alone
        This is from the CSSTidy:
        12/12/10 4:23:24 AM Coda[4837] Coda PHP Toolkit: Executing at path /Users/Jon/Library/Application Support/Coda/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/csstidy.php with (
        “-t”,
        default,
        “-l”,
        LF
        )

        This is from proCSSor:
        12/12/10 4:23:51 AM Coda[4837] Coda PHP Toolkit: PHP Toolkit: Curl to http://procssor.com/api with: (
        “-s”,
        “-S”,
        “-F”,
        “source=file”,
        “-F”,
        “safe=1”,
        “-F”,
        “property_formatting=newline”,
        “-F”,
        “braces=default”,
        “-F”,
        “indent_size=default”,
        “-F”,
        “selectors_on_same_line=1”,
        “-F”,
        “docblock=0”,
        “-F”,
        “css=@-;type=text/css”,
        “http://procssor.com/api”
        )
        12/12/10 4:23:51 AM Coda[4837] Coda PHP Toolkit: Executing at path /usr/bin/curl with (
        “-s”,
        “-S”,
        “-F”,
        “source=file”,
        “-F”,
        “safe=1”,
        “-F”,
        “property_formatting=newline”,
        “-F”,
        “braces=default”,
        “-F”,
        “indent_size=default”,
        “-F”,
        “selectors_on_same_line=1”,
        “-F”,
        “docblock=0”,
        “-F”,
        “css=@-;type=text/css”,
        “http://procssor.com/api”
        )

        1. Okay –

          could you please mail me the CSS-file? mario -at- chipwreck -dot- de.

          And:
          – Is it UTF-8 or another encoding?
          – Which line-endings are being used?

          I’ll have a look the next days.

          mario

        2. Okay, problem solved: The LessCSS-Plugin is incompatible.

          So if anyone has the same problem when using proCSSor: Uninstall the LessCSS.codaplugin.

          According to Bryan, the developer, the plugin is not supported anymore – but you can use the much better standalone application Less.app:

          http://incident57.com/less/

          (An update of CSSTidy will follow the next days).

  11. This is a great plug in. One question, with the HTML tidy, is there a way to remove HTML comments (and perhaps even the option of preserving IE conditional comments)?

  12. I work at a company with a more rigorous coding standard than this PHP validator. Is there a way I can modify this validation. We have ruled about spacing before and after variables, line spacing rules, etc. If I could modify this to perform validation that would be spectacular.

    1. The plugin currently uses phptidy and I plan to either make this also configurable (which might take some time) or to look if there are other open source php reformatters.

      But for now you can change the configuration manually:

      – Go to (your home folder)/Library/Application Support/Coda/Plug-ins
      – Right click the PhpPlugin-file, choose “Show Contents”
      – Navigate to “Contents/Resources”

      There you find the “phptidy-coda.php”-file, where you can change the configuration (at the beginning of the file). Since you’re a php developer that should be easy.

      Please note that your changes are being overwritten if you update the plugin, so keep a backup..

      Hope that helps – if not, tell me..
      mario

  13. Hi Mario,
    Thanks again for this great plugin. I was wondering, is it possible to edit the JS minify function so as to do its job but without breaking lines? Right now (beta 2.0) it minifies okay but there’s a sense that it could do even better if there were no line breaks at all. Or maybe, this wouldn’t make a difference anyway… You tell me.
    Cheers.
    Reno

  14. Hi,

    Thanks for a great plugin.

    I have a little feature request:

    It is possible to have a configuration so that the JSlint results open in a new split instead of a new tab? Would make de-linting a lot simpler.

    Cheers

    1. Would be a very good idea – but unfortunately that’s not possible with the current Coda API.

      I’m going to send a feature request to Panic, so in a future version of Coda this might be possible.

  15. Hey guys,

    I absolutely love the plugin. I just discovered JSLint and ran into a little problem while using it with your plugin.

    This is the line that gets me into trouble.

    var string = “”;
    var html = string.replace(/]+>/gi, ”);

    JSLint thinks it’s just fine but when I run it from the plugin it seems to actually escape the / and JSLint shows this:

    Problem at line 2 character 32: Expected an identifier and instead saw ‘^’.
    var html = string.replace(/]+>/gi, ”);

    1. Hi!

      it seems the regex is not correctly displayed in the comment section here.

      If I try for example this:
      var html = string.replace(/[a-z]+>/, '');
      it works.

      So could you send me the line via email or describe it in words?

      thx.

      1. Thanks Mario.

        So the problem comes from looking for an actual forward slash, which is escaped in the regular exprssion.

        Let me try one more time with spaces in between lets see if this works.

        // jquery strip tags function uses simple regexes
        var string = “<hello></hello>”;
        var html = string.replace( / < \ / ? [ ^ > ] + > / g i, ”);

        1. Okay, now I can reproduce it.

          It seems to be a problem with passing the editor content to the javascript interpreter (and then to the jslint)..

          I’ll have a look!

        2. Okeee – I think I’ve fixed the problem.
          I updated the current 2.0 beta version (download above), there it should work.

          (The OS X javascript processor needs some weird ways around bash shell to do what I want and in that process the backslash went lost.)

  16. Hi Mario,
    Thanks for the beta update. Overall, very good. However, I’d like to report something that is probably not a bug but just the way the tidy CSS works. I have on my site a table that sorts and filters itself through a set of inline-block buttons. I got the js and the CSS from the web. It has a few hacks that allow the whole thing to look good and the same in all browsers. I have tried other ways (more standard CSS) but nothing works like the hacks. Here (this is for a ul li)

    display:-moz-inline-stack;
    display:inline-block;
    zoom:1;
    *display:inline;
    (etc.)

    What the CSS tidy does with this is :

    zoom:1;
    display: inline;
    (etc.)

    And of course that changes everything. The pages look pretty awful.Don’t ask me what ‘zoom:1’ means or how it works, I couldn’t tell. All I know is without any of these lines the page just looks awful in one or the other browser.

    Questions: is this normal behaviour of the CSS tidy? Fortunately, I don’t have a lot of these hacks (except the inevitable -moz ones). Is there a way to tell the tidy NOT to remove anything (including the * in front of display:inline (but only /* and */)?

    Thanks again for your good work.

    Reno.

    1. Yes – that’s not a bug, but expected behaviour:

      CSStidy has a setting called “preserve css“:

      • – If it’s turned on (like in my plugin if you use “default”), comments and hacks are *not* being removed.
      • – If it’s turned off (like now in “highest compression”), hacks and comments are being removed.

      You can find more information here: csstidy.sourceforge.net/hacks.php.

      Interestingly the last days I started to think about integrating another CSS reformatting method – via a webservice (procssor). But first at all I’d like to make sure that 2.0 works stable..:)

      (BTW: “zoom:1” and the line starting with * are hacks, needed for Internet Explorer).

  17. Hi again Mario,
    Still really enjoying your plugin and looking forward to the update (in regard to tidy especially).
    One quick question: Tidying CSS is great but doesn’t remove comments (/*comment*/). I’ve tried High Compression and Highest Compression. Is there a reason for this, and if it is possible what change do I need to make to the code to have it simply remove unnecessary comments?
    Thanks.
    Reno

    1. Hi –

      yes, you’re right. The comments were currently only removed if you select “default, sorted” (no idea why :)

      I updated the 2.0beta, so “highest compression” now removes them also.

      Thanks for the hint,
      mario

  18. Hi,
    I really like your plugin. But there’s something I don’t seem to be able to work around: the HTML Tidy keeps removing the character entities in spite of editing the config files (i.e., preserve-entities: yes, etc.). What am I missing? Or can you give show me how to edit the config file? Right now I have to use another plugin to restore my entities each time I Tidy my pages. Thanks for your help, and thanks for your plugin.
    Reno

    1. Hi –

      the plugin uses the tidy-binary which is included in OS X (/usr/bin/tidy). Unfortunately this version is a bit older (2006) – “preserve-entities” was added in the next version…

      You can use a newer version of tidy (from MacPorts for example) – you then only need to change the path in PHP Toolkit -> Preferences.

      (The entry “preserve-entities” in the configuration file is therefore a bit confusing – since it is ignored in the tidy version which is used by default.)

      Does this help?

      1. Hi Mario,
        Thanks for your reply. Unfortunately, I’m not sure what I ‘m supposed to do at this point in regards to Tidy. The MacPorts website and its content is a bit over my head. All I want is the tidy to keep my entities just as they are (instead of decoding them). Will you be able to fix this in a future version of the plugin? If so, I think I can manage until then. Otherwise I would certainly appreciate a simpler solution. Thanks a lot for your help. – Reno

        1. Yes of course, MacPorts is only useful if you are experienced at the command line.. And it’s not so easy to setup, especially if you just need only one program.

          So, I’ll try to include a new version of tidy in the next release of my plugin (probably in the next 2 or 3 weeks or so).

          But – there’s an (easier) workaorund of course, have a look here ».

          1. That’s really great Mario. I’ll have a look at the Tidy link for now and I’ll be checking out for your next update from time to time. Thanks a lot for your help and clearly your sound knowledge of this field. Bye for now.

  19. Hello, just tried to open this plugin on Coda and im gettin an error : The document “PhpPlugin.codaplugin could not be opened” The plug-in “PhpPlugin” could not be read. please verify the plug-in’s format or try re-downloading…

    I have latest version of snow leopard and lates version of coda (1.6.12)
    i tried downloading the plugin from this website a couple of times. maybe is corrupt??
    just calculated the md5 hash for the file and its:

    MD5 (php-codaplugin-1.9.zip) = afdde7f6b23841d9ecc98760247c1060

    Thanks in advance for your help! can’t wait to use this plugin!!

    1. Hi –

      I suppose it’s the same problem marlyse had some weeks age:

      The “.codaplugin”-extension is linked to the “Coda Plug-in Creator” – so if you doubleclick a plugin “Coda Plug-in Creator” tries to open it, which goes wrong since the Plugin was developed with Xcode and not the Plugin Creator…

      To install the plugin in Coda do the following:

      – Right-click on the “PhpPlugin.codaplugin”-file and choose “Open with…” and select “Coda” (instead of the default entry “Coda Plug-In Creator”).

      (You can also use the information window CMD+I to change the association of .codaplugin-files permanently).

      Does this help?

      1. Yes! that was the solution! i thought that needed to be opened with Coda, my bad hehe

        Many Thanks! i will play with the plugin right now :)

  20. Hey! I love the new features, especially the HTML tidy. My only suggestion would be to include options for alternate line endings – I use a Mac, and get red paragraph symbols at the end of every line after tidying – very annoying!

    Keep up the good work!

    1. HTML Tidy assumes Unix line endings (by default on OS X), so as a quick workaround you can convert your page(s) to Unix line endings:

      [Text -> Line Endings -> Convert to Unix Line Endings]

      But of course a configuration option is the correct solution, is on the todo-list now :)

      Thx!

  21. Wonderful plugin, cmd+shift+V has become a standard “clawhand”.

    One thing though, tidy PHP causes my function opening curly bracket to go onto a new line. I know it’s personal preference but I like to keep it on the same line.

    e.g. function my_func() {

    Possibility on an option within preferences?

    1. As a workaround you can open the preferences, click “reveal in finder” and edit the file “phptidy-coda.php”:

      Then modify line 69 like this:
      $curly_brace_newline = false;

      But a configuration option would of course be better, is remarked on the todo list :)

  22. PhpPlugin.codaplugin => “wonderful”;

    Thank you for this plugin.

    Question: how can I configure the HTML Tidy to not format with empty lines? I’m using all default settings.

    thx
    Matt

    1. Hi –

      you can choose “very indented”, this removes the newlines.

      Or you can manually change the default configuration by editing the config file (click “reveal in finder” in the preferences menu). There change “indent: auto” to “indent: yes”.

      (Note that the manual modification is overwritten when installing a plugin update).

    1. Hi –

      yeah, something like that is planned for the next release, but now I’ll be on vacation for the next week so expect the next release in 2 or 3 weeks :)

      mario

  23. Hi.

    It seems that it is removing my parenthesis, when tudying PHP. So require_once(“class.forms.php”); becomes require_once “class.forms.php”;

    Anyway to avoid this?

    1. Hi –

      at the moment not. I could change the tidyPHP-class, but that would make this behaviour standard. A better way should be to configure it. If I make the next release I’ll have a look and try to include it.

      mario

  24. the downloaded plugin can’t be opened, I tried both versions, the universal and the one from top link. any ideas? I am on latest osx and intel. thanks!

      1. Hi :D

        The plugin itself. The error I get is :

        The document “PhpPlugin.codaplugin” could not be opened. The pug-in “PhpPlugin” could not be read. Please verify the plug-in’s format or try re-downloading the plug-in from the author’s website.

        Same happens if double-clicking the plugin which usually would install it or when trying to open it via the Coda Plugin Creator.

        1. Hi –

          I see! The codaplugin-extension is linked to the “Coda Plug-in Creator” – so if you doubl-eclick a plugin “Coda Plug-in Creator” tries to open it. In this case this goes wrong, because the Plugin was developed with Xcode and not the Plugin Creator.

          To install the plugin in Coda do the following:

          – Right-click on the “PhpPlugin.codaplugin”-file and choose “Open with…” and select “Coda” (instead of the default entry “Coda Plug-In Creator”).

          (You can also use the information window CMD+I to change the association of .codaplugin-files permanently).

          mario

  25. Where are the config files for HTML Tidy kept on OSX? I want to get rid of the removal of entities “feature”. The Show in Finder button just moves up and down but doesn’t open anything. Thanks!

    1. Hi –

      the “show in finder”-button will be fixed in the next release.

      The files can be found this way:

      Move to:
      (your user folder)/Library/Application Support/Coda/Plug-Ins/

      Now right click the “PhpPlugin”-file and select “Show Contents”.
      Then move to:
      Contents/Resources/

      There you’ll find the tidy_config_*.txt files for the different configurations.

      Hope that helps,
      mario

  26. Hi Mario.
    I’m using coda on 10.5.8 on G5. OSX says that file downloaded from this site is for intel macs. Are there any chances of getting ppc version of plugin? Or maybe you could share the source, then I could try to compile it by myself?

  27. Great plug-in Mario

    it’s good to see that you start adding js into plug-in as well, here is couple of sources or suggestion:
    http://mondaybynoon.com/2008/12/15/css-tools-coda-plugin/
    additional formatting for css which could be add to this plugin
    http://mondaybynoon.com/2008/12/15/javascript-tools-coda-plugin/
    additional formatting for js which could be add to this plug-in
    Also textmate has nifty js format bundle that will be a great if that can be added in future releases

    Thanks again for this handy useful plug-in

    1. Hi –

      CSS reformatting (single, multiple lines, high/med/low compression) is already possible.

      But thanks for the JS suggestions – including minify and YUI is a good idea, I think this will be one of the next features. I had a look at the TextMate JS and JSTools bundle, that’s a whole lot of stuff: Dojo, Google Closure, JSMin, YUI and so on… I think I should start with the most used ones: YUI and a JS Beautifier (reformatter).

      mario

  28. Great fanatastic plugin !
    The php jumpto line is the greatest for me

    i have a little issue when validating html online, the css part of the w3 validation page is not working. Maybe just a wrong url issue?

    1. Hi –

      well here it works (HTML & CSS), just tested it. Maybe the w3c-page was temporarily offline. Are you referring to HTML or CSS validation – and – which error do you get?

      mario

  29. Hi Mario,

    First of all thanks for this awesome plugin!

    Is there anyway you could improve CSS Tidy to not screw up CSS 3 declarations like :

    background: -webkit-gradient(linear, 0 0, 0 100%, from(#e8e8e8), to(#fefefe));
    background: -moz-linear-gradient(top, #e8e8e8, #fefefe);

    That would be a great addition.

    Happy easter,
    Matt.

    1. Hi –

      unfortunately CSStidy isn’t being developed actively (last release 3 yrs ago) – but I’ll have a look at the sourcecode, maybe there’s an easy way to improve it.

      mario

    2. Okay, the next version (1.81) will have a workaround for this problem by ignoring CSS values starting with a dash (-), should be ready in a few days.

      [UPDATE:] Is now released..:)

      regards,
      mario

  30. I’m using v1.8 beta, but I can’t get CSS Tidy to sort properties. I’ve even tried editing the csstidy.php file itself and updated the following line:

    $this->settings[‘sort_properties’] = true;

    Any suggestions?

    1. csstidy.php is right – look at line 2658 and change two lines this way:

      $css->set_cfg(‘sort_properties’, true);
      ..
      $css->set_cfg(‘preserve_css’, false);

      Question: What setting do you use? I will then add a new config setting in the next version.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.