3.9
New: Validate JS on save (Coda 2 only)
New: Separate CSS minification included
Fix PHP validation on save with selection
Laxcomma setting for JSHINT
JSMinify updated
3.8
Lots of bugfixes
Compatibility with other plugins improved
JSMinify updated
3.7
New: Minify on Publish (Coda 2 only)
New: Modify file extension list for PHP validate on save
Check if Growl is present, includes Growl 1.2 and Growl 1.3 notifier
CSSTidy: New option Remove last ; – control if the last ; in a block is removed or not
CSSTidy: Workaround for wrong @import behavior
JSHint: Doesn’t report useless strict warnings anymore
JSHint: Removed unused –safe option
JSHint: Added link to option documentation in the preferences
CSSTidy/JSMinify: CR/LF handling improved
PHPTidy won’t try to format php files with syntax errors
Rewritten launching of php based tools, more robust now
Refactoring PHP error display
Performance/memory improvements
Preferences layout improved, added Google+ link
3.6
“Unified” version for Coda 1 and Coda 2
Checks automatically if accidentally more than one plugin is installed
New function: PHP validate on save (Coda 2 only)
Javascript JSHint: Updated to a new version
Javascript Tidy (JSBeautify): Update to latest version, no file size limit anymore, CR/LF handling correctly now
CSS Tidy: Update to latest version, CR/LF handling correctly now
Performance improvements (loading time, js functions)
New version notification now shows the new version number...
Plugin path is now correct for Coda 1 and Coda 2
3.5 beta
Coda 2 compatible version
New preference setting for JSHint: Use smart tabs
“Go to line” (for PHP errors) now uses the API function in Coda 2, so it scrolls to the error location
Automatic update should now work correctly with Coda 1 and Coda 2
3.4
Remove proCSSor because the API service has been cancelled
3.3
Small bugfix for Prefs window layout
Internal structure improvement
Fix (improbable) memory leak
3.2
Validate PHP syntax before performing PHPtidy
Minify CSS
Updated CSSTidy
Preferences window improved (links to twitter/fb/donate)
JS Hint: Many more options
JS Hint: Respect line endings, whitespace warnings now correct
JS Tidy: Respect line endings
3.1
JS Tidy now also configurable
proCSSor bugfix
Respect Tabs/Spaces where available
Automatic Update (finally..!!)
Improved validation results
JS Hint updated
PHPTidy improvements
JS Hint: Remove (quite useless) "unsafe character" warning
Result window looks cooler now
Modularized the code
Modularized the code
Prefs window improved
3.0
Use selection
Growl (and growl-like) notifications
Results as floating window
More preferences for PHPTidy
HTML online validation: Included three validator settings
Drop curl, use cocoa instead
Use JSC call instead of shell script
JShint preferences
Improved preferences layout
Bugfixes, lots of
Nearly complete code rewrite
2.7
Show an short message after updating (only once)
Updated CSSTidy to 1.3.1
HTML Validate output improved
HTML5 support
aka workaround for tidy
JSLint replace by JSHint (upgrade, kind of)
Preference for PHPTidy: Fix statement brackets
2.6
Preferences for PHPTidy: New lines, Whitespaces, Comma spacing
Bugfix for umlaut conversion with JSTidy
2.5
Set CSS Level for validation (2, 2.1, 3)
Configure PHPTidy braces placement
2.4
Warning message (incompatible plugin) improved
Before accessing proCSSor, check if incompatible plugin present
2.3
TidyCSS update (current SVN)
W3C online response much more readable
Check for incompatible SBJsonParser
Error messages improved
Updatecheck circumvents cache now
2.2
New: Beep only for PHP validation
Preferences window now remembers the open tab
Preferences window revamped (again..)
Shortcuts also shown in the preferences
HTML Tidy version in about window now modified if "use internal" is changed
Improved some tooltips in the preferences
2.1
New: procssor.com configurable
New: JSBeautifier included
About window now part of the preferences
Preferences window revamped
Code clean-up
Shortcut for JS Beautifier
2.0
New: Encoding automatically selected
New: Custom HTML tidy configuration
New: Included a more recent HTML tidy binary
New: procssor.com online service included (experimental)
Goto line now works correctly with different line endings
Line endings now respected in HTML tidy, CSS tidy and PHP tidy
HTML tidy version shown in the about page
Preferences window new layout
JS lint now correctly handles backslashes
Error messages improved
Message sheet layout improved
1.9
New: JS Minify
HTML Validation report window now can be close without the annoying "Save Changes"-question
"Reveal in Finder" bugfix at preferences page
Donation button in the about window (Hint: click it :)
1.81
CSS tidy now handles CSS3 values starting with a dash (-)
Keyboard shortcuts for CSS tidy and Preferences
Some code clean-up
1.8
Javascript Lint (JSLint) now included
Update check now daily instead of each time Coda starts
New CSS tidy configuration: Sort attributes
1.7
HTML tidy now configurable (in the Preferences) !
Preferences are automatically saved
Bugfix when saving Coda Prefs
1.62
Automatic update check now in the background (asynchronous)
CSS tidy now configurable (in the Preferences) !
Less intrusive error-messages on connection failures
1.6
User Preferences
Automatic check for updates
CSS tidy integrated
Structured Menu (aka Submenus)
Using the HTML-tidy version delivered with OSX (PowerPC compatible)
Redesigned the error- and "validation okay"-sheets XCode-like
More encodings: ASCII, UTF-16, Windows CP-1252
All functions use the current buffer contents now
Error messages not explicitely state their origin
Updated phptidy to current version 2.10
1.4
W3C-Validation online for HTML-files
W3C-Validation online for CSS-files
Help button (on the about sheet) now opens this page
1.31
W3C-Validation service, 1st try
1.3
Improved Sheet display
Bugfixes
1.13
Validate HTML (via tidy)
Jump to error line – if PHP validation finds an error
Check for Updates (in the about-box)
File encoding can be chosen
Nice sheets, no more of those ugly alert-boxes
Menu items are only available if they should be
Lots of code cleanup
More useful “About”-dialogue, link to the plugin homepage
0.96
"About.."-dialog
Improved exception handling
Bugfixes
0.9
New features: HTML tidy, Strip PHP, PHP tidy
Included HTML Tidy
Included phptidy
Bugfixes
0.85
Bugfixes, dialogs updated
0.8
Initial release
How do I prevent Tidy HTML from stripping out CMS specific tags, such as:
<perch:label …
<perch:input …
<perch:error …
Select “custom..” as configuration for tidy and add the tags after “new-blocklevel-tags” or “new-inline-tags” – that shall do the trick.
Great Plugin thanks alot!
I have an issue where the html tidy strips out a closing / on my images. I need them to be there to not cause issues when using this code with xslt. Is there any setting in the custom section I can set or change that would stop it from stripping the closing /?
Thanks!
Therefore the document must be valid XHTML, then the closing / is syntactically correct.
So if you use the following header, HTML Tidy won’t strip the closing / :
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title></title></head>
<body>
...
<br />
<img src="" />
...
</body>
</html>
Tidy HTML will erase list tags that don’t have text in them such as:
i .. /i
In this sample I am using an icon and do not want to add text.
Cheers
Yes, that’s how tidy works. You can use a non-breaking space (ampersand + nbsp + semicolon) as a workaround.
Awesome plugin mate! Thank you SO much!
… While it worked. Not sure what I did, or if I did anyting, but suddenly all actions are greyed out in the PHP, CSS, JS and HTML sub-menus, i.e. I can’t do any more validations or tidying…
Have also removed and reinstalled the plugin, but same problem. Using latest version 4.0, and it worked just fine yesterday!
Any pointers?
Thanks so much,
Florian
Make sure you have a file with more than just a few characters open – the menu items are only greyed out if there’s no active editor (or if the editor window contains no text (= less than some characters).
Hope that helps – otherwise write a mail, then we’ll have to debug it.
Have you considered leveraging this as a PHP formatting option? Just as an alternative to self configured PHP Tidy?
It appears that this is based off of PHP-FIG (PSR-0, PSR-1, PSR-2) which is commonly agreed upon standards across most of the major frameworks.
Available via both PEAR and SensioLabs download
PEAR – http://pear.php.net/package/PHP_CodeSniffer/redirected
SensioLabs – http://cs.sensiolabs.org/
Works great. Thank you.
The only thing I cannot modify through the preferences or the phptidy-coda.php file is the curly brace after functions going to a new line.
Setting $curly_brace_newline = false; does not seem to be the answer.
Also, occasionally and on files not authored in Coda, we see conditions dropping to a new line i.e.
if/else newline ( condition )
We correct this using a regexp .. and then next Tidy it will not happen.
I love this plug-in!!! Thank you very very very very very very much!!!
thanks – nice to hear :)
omg, you’re a star. Thankyou.
:)
Great plugin!! Thanks!
:)
I have the “Validate on save” option picked for JavaScript files with the “Results in Floating Window” option. However, a new window is generated after each save (even for the same file). Could you just replace the contents instead?
Hi -
okay, is notified and I’ll have a look the next days.
I love this plugin, but have found one annoyance. I use jQuery and jQueryUI extensively, and JSHint doesn’t like the jQuery syntax :-(. Any plans for adding that syntax so I don’t get a huge list of non-errors? Regardless, thanks for this!
Hi -
have a look here on how to validate correctly: http://docs.jquery.com/JQuery_Core_Style_Guidelines#JSLint
Ahh, I see. Thanks.
Greetings,
I’ve been evaluating Coda 2 and frankly I decided to buy it based on how great this plugin is!
Unfortunately, everything was working until I moved Coda 2 from Downloads to Applications. Now none of the features work in the plugin. For example when I minify JS I get “JSMinify returned nothing – Make sure the file has no errors, try using UTF-8 encoding.”
I get this error if I try to tidy PHP as well. So I removed the plugin and re-installed it…and no dice. Still getting the error. Setting the file to UTF-8 didn’t help.
Please help– this is such a great plugin I’m having withdrawal symptoms!
Thanks,
-NorthK
This is what the console error shows:
Application Specific Information:
Performing @selector(doJsTidy) from sender NSMenuItem 0x10ba752c0
*** multi-threaded process forked ***
*** NSTask: Task create for path ‘/Applications/Mamp/bin/php/php5.4.4/bin’ failed: 22, “Invalid argument”. Terminating temporary process.
Hi -
this seems to be a problem with your php installation. Usually the plugin uses the default OSX php installation (/usr/bin/php). In your case it seems the PHP path is set to the MAMP installation. Please check in the plugin advanced preferences if you can set it back to /usr/bin/php.
Hi Mario, you were right. For some reason the plugin didn’t like executing MAMP’s version of PHP. I must have changed the default setting and forgotten about it.
It’s working now– thanks so much for your help and for writing a great plugin!
-NorthK
FOR CODA 2, When using VALIDATE HTML and TIDY HTML, there is error as below:
NSInvalidArgumentException
Reason:
launch path not accessible
How to work it out?
Hi -
this usually points to a problem with your php installation. Please check the php path in the plugin preferences (advanced). It is usually “/usr/bin/php”. Then open Terminal and enter the given path, like “/usr/bin/php -v” (without quotes) and check what the result is. If there’s an error message it hints to a defect php installation.
When entered “/usr/bin/php -v” (without quotes) , It says:
PHP 5.3.15 with Suhosin-Patch (cli) (built: Aug 24 2012 17:45:44)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
No error, does it mean no problem with my php installation? BUT I still got the error msgbox…
Okay, your php installation looks fine – now please enable “debug mode” in the advanced section of the plugin preferences, open “Console”, start using “Validate HTML” and copy all the lines from the console which contain “Coda PHP Toolkit” and send them to me or copy them to a comment..
Please see the code below:
Coda 2[13383]: [Coda PHP Toolkit] Executing at path /Users/xu/Library/Application Support/Coda 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy with (
“-config”,
“/Users/xu/Library/Application Support/Coda 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy_config_check.txt”,
“–newline”,
LF,
“-utf8″
)
13-1-29 上午8:42:31.376 Coda 2[13383]: Exception occurred: 0 ExceptionHandling 0x00000001009f3637 NSExceptionHandlerExceptionRaiser + 174
1 libobjc.A.dylib 0x00007fff91c023f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8e99ae7c +[NSException raise:format:] + 204
3 Foundation 0x00007fff90845cd2 -[NSConcreteTask launchWithDictionary:] + 409
4 PhpPlugin 0x000000010ffcb46b -[CwPhpPlugin filterTextInput:with:options:encoding:useStdout:] + 594
5 PhpPlugin 0x000000010ffcac62 -[CwPhpPlugin validateWith:arguments:called:showResult:useStdOut:alwaysWholeBuffer:] + 246
6 PhpPlugin 0x000000010ffc6812 -[CwPhpPlugin doValidateHtml] + 261
7 AppKit 0x00007fff8b7a5a59 -[NSApplication sendAction:to:from:] + 342
8 AppKit 0x00007fff8b8db44c -[NSMenuItem _corePerformAction] + 406
9 AppKit 0x00007fff8b8db13a -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 133
10 AppKit 0x00007fff8b5c846f -[NSMenu _internalPerformActionForItemAtIndex:] + 36
11 AppKit 0x00007fff8b5c82f7 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 135
12 AppKit 0x00007fff8b8d4245 NSSLMMenuEventHandler + 342
13 HIToolbox 0x00007fff89c0af0a _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1206
14 HIToolbox 0x00007fff89c0a3d9 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 410
15 HIToolbox 0x00007fff89c201bd SendEventToEventTarget + 40
16 HIToolbox 0x00007fff89c56e89 _ZL18SendHICommandEventjPK9HICommandjjhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 443
17 HIToolbox 0x00007fff89bfbc11 SendMenuCommandWithContextAndModifiers + 59
18 HIToolbox 0x00007fff89bfbbc3 SendMenuItemSelectedEvent + 254
19 HIToolbox 0x00007fff89bfba4f _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 94
20 HIToolbox 0x00007fff89bd7aab _ZL14MenuSelectCoreP8MenuData5PointdjPP13OpaqueMenuRefPt + 605
21 HIToolbox 0x00007fff89bd70b8 _HandleMenuSelection2 + 565
22 AppKit 0x00007fff8b7939c6 _NSHandleCarbonMenuEvent + 245
23 AppKit 0x00007fff8b6b5b7f _DPSNextEvent + 2073
24 AppKit 0x00007fff8b6b4ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
25 AppKit 0x00007fff8b6ac283 -[NSApplication run] + 517
26 AppKit 0x00007fff8b650cb6 NSApplicationMain + 869
27 Coda 2 0x00000001000020f4 start + 52
28 ??? 0×0000000000000002 0×0 + 2
13-1-29 上午8:42:31.377 Coda 2[13383]: [Coda PHP Toolkit] Exception NSInvalidArgumentException launch path not accessible launch path not accessible
This is strange..
So:
1. Please open Terminal and enter the following line (with quotes), press Return and send me the result:
“/Users/xu/Library/Application Support/Coda 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy” -v
2. Which Mac and which OS X-version do you use?
thx!
1. the result is “Permission denied”
2. mac mini 2011, OSX 10.8.2
Okay, “Permission denied” isn’t correct. But I’ve currently no idea how this might happen..
Please try this command and check if it helps:
chmod +x “/Users/xu/Library/Application Support/Coda 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy”
It says:
chmod: “/Users/xu/Library/Application: No such file or directory
chmod: Support/Coda: No such file or directory
chmod: 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy”: No such file or directory
i dont know why? Because this file “/Users/xu/Library/Application Support/Coda 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy” is exist.
You should either use normal quotes (shift + 2) – or – put a backslash before each space, like this:
chmod /Users/xu/Library/Application\ Support/….
it helps!! Thank you so much! I’m sure you will fix this bug in the next upgrade:)
Glad we sorted it out, but this bug seems to be specific to your installation – in the plugin itself, the permissions are set correctly (checked this on different platforms).
drop-empty-elements: no
Hi
Use:
drop-empty-elements=no
See: https://github.com/w3c/tidy-html5/issues/36
Cheers,
Brandon
[...] compressed CSS so you will need to un-compress it, I use Coda from Panic as my code editor with the PHP and Web Toolkit so “Tidying” the CSS to a readable and usable format is fairly easy. You can beautify [...]
[...] compressed CSS so you will need to un-compress it, I use Coda from Panic as my code editor with the PHP and Web Toolkit so “Tidying” the CSS to a readable and usable format is fairly easy. You can beautify [...]
*FIGURED OUT A BUG CAUSE!*
I was using “Minify CSS” on my site and my CSS3 animations stopped working in Firefox. I discovered the reason: Minifying using your plugin is adding quotes around the “animation name” property. This causes the animation to break (at least in FF 17.0.1 on my Mac).
Thanks for a GREAT plugin!
I see – yes, firefox doesn’t like the quotes (all other browsers work correctly with or without quotes).
There’s already a patch for CSSMinify – it will be fixed in the next version.
This is an awesome plugin. Thanks for your hard work.
This is so awesome. I would not be able to work without it. Another thing I would not be able to work with out is SASS. I cleaned my SASS with the CSS tidyer. It broke it.
Are there any plans for a SASS tidyier? Is that a bug that the CSS tidyer can even touch my SASS code?
-Josh
Hi -
well the CSS tidy tool is only useful for (pure) CSS code – so it’s not a bug in that sense. The CSS tidy should only be used for CSS code, not SASS or LESS.
Currently I don’t know if a SASS (or LESS) tidy tool even exists. If so – and if it’s open source and written in a language I can integrate – I can have a look.
I thought the Coda 1.6 version did a ‘pack’ as well as ‘minify’ for js. Any plans on implementing that?
JS minify is included, but a JS packer is nothing I plan to include. Because IMHO packing isn’t helpful – it just obfuscates JS code, makes it nearly impossible to debug and slower on the client side since it must be rebuild using “eval”.
That’s exactly the point. I pack the code before delivery to help protect it. L=:)
Yes, but as you might now this protection is extremely easy to circumenvent, that’s why I don’t see much use in packing.
Hi!
It seems that the “Notify with Growl” option gets unchecked sometimes, don’t know if this is related to restarting Coda 2 or restarting Growl or what.
Using latest Coda 2 version, OSX 10.8 and the latest version of Growl from the Mac App Store.
Hi-
that happens if the plugin thinks Growl is not installed, which happens with the paid versions from the App Store (I don’t use them and have no way of tracking if they are installed..)
I wish I found this earlier! Would have saved me hours of making sure I closed all of my tags and other menial work.
Any way to set Tidy Js to use 3 spaces for tabs instead of 4?
Found it in
~/Library>Application Support>Coda 2>Plug-ins>PhpPlugin.codaplugin>Contents>Resources>jsbeautifier.php line 46
Yes, that is not optimal of course, but setting spaces correctly in all cases is on my to do list.
powerful tools!!!!!!!!!!!!!!!!!!!!!!!!!!great!!
Regarding wrapping links around block-level elements:
The only markup in my .php document was this:
<a class="section-overview-nav">
<img class="img-circle push-down" src="images/life-with-t1d/life-stage-nav_starting-school.jpg">
<h3 class="center-text shadow-white">Starting School</h3>
</a>
</div>
I ran Tidy HTML with the default settings and it returned this:
<a class="section-overview-nav"><img class="img-circle push-down" src="images/life-with-t1d/life-stage-nav_starting-school.jpg"></a>
<h3 class="center-text shadow-white"><a class="section-overview-nav">Starting School</a></h3>
</div>
In case the above code didn’t get entered in to this comments field correctly, here is a link to it on codepad: http://codepad.org/7ogyt8SR
Thanks!
Okay, I see – in HTML4/XHTML it’s not allowed to nest an H3-Tag inside an A-Tag, therefore HTML “corrects” this issue.
This should not be a problem im HTML5 AFAIK, but HTML Tidy currently doesn’t natively support HTML5, unfortunately.
Hi,
Is there a way to set the Tidy HTML settings so that the only thing it changes is spaces and indents to clean up the nesting?
Two examples of what it’s currently doing that I don’t want it to be able to edit:
Deleting my “i”-tags”
Changing…
...
</a>
to…
<a>...</a>
I’m using the default settings.
Thanks!
Hi -
To keep “i”-tags use a custom configuration and add this line:
I can’t reproduce the other problem. If you have an “a”-tag, some lines of text and a closing “a”-tag HTML tidy doesn’t create two “a”-tags.. Maybe there’s another structural error in the file? Just remove everything else and test it with a minimal set of tags.
Many thanks for getting back to me.
How do I post code in your comments box without it being stripped out?
I just created a new file with the simplest markup and ran HTML tidy. I can post the results of what it’s doing.
Thanks!
Use square brackets instead of “smaller than” / “larger than”..
Hi,
The Bootstrap framework uses the “i”-tag. Is there a way to update the HTML preferences so that Tidy won’t strip out them out?
Many thanks for the awesome plug-in.