4.2
JSHint 2.3.0 included
Removed some legacy options from JSHint configuration
Use any JSHint option, there’s a text field in which you can enter JSHint config options. (separated by comma).
A list of valid options can be found here: jshint.com/docs/options/
Rewritten JSHint-Wrapper (because JSHint works a bit differently now)
Removed some legacy JSHint options
4.1
Bugfix for a very improbable exception
Code update (mostly internal stuff)
Dialog layout improved when resized
4.0
CSSTidy updated to the current development release. This should now correctly format CSS inside @media-tags.
Integrated HTML 5 compatible tidy for validation and reformatting
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
Have you ever considered porting this over to the Espresso editor?
Not really.. I already had someone else asking this and had a look at Espresso plugin development.
First I don’t use Espresso (had a look two or three times and found it not to be a great tool). But second and more importantly: The plugin interface quite differs from Coda so I’d have to rewrite nearly everything, test it and so on (not mentioning having to do this every time I add a feature). Because of that I’m afraid this isn’t going to happen soon..
Fair enough. I have been using TextWrangler for a while and every once in a while think about switching to Code or Espresso or some other hot new editor. Mostly for the intellisense features as I’m starting to use jQuery more and more.
Your tools are great and something that’s definitely missing from other editors. You might just sway me over to Coda.
Good to hear :)
And I’ve heard Coda 2.0 is on the way, so maybe wait a bit before purchasing..
Hi,
After installing the PHP and Web Toolkit, Coda can’t find anything anymore in the files when doing cmd+f. I’ve found a topic on Google that shows someone with the same problem: http://groups.google.com/group/coda-users/browse_thread/thread/9324429900654bc7
Maybe something to look into, or do you know a way to solve this? The toolkit has some great functionality but having to give up the find functionality is a bit too much…
I’ll have a look tomorrow. thanks for reporting, I wasn’t aware of this problem.
Hi,
I uninstalled the PHP and Web Toolkit, and the find function worked again, so it does seem related. However after reinstalling the PHP and Web Toolkit the find function still worked. I’m glad I can now perfectly use both.. :)
Maybe something odd happened during installation of the plugin the first time?
Okay – good to hear.
The only possible explanation would be that the plugin was accidentally installed twice or Coda was not restarted (see here: http://www.chipwreck.de/blog/software/coda-php/help/#quick ).
Because it’s impossible for a plugin to inject into Coda functions like searching.
thx for testing,
mario
For some reason I get these messages when using ‘Tidy PHP’ or ‘Tidy CSS’:
PHPTidy returned nothing
Make sure the file has no errors, try using UTF-8 encoding.
(or)
CSSTidy returned nothing
Make sure the file has no errors, try using UTF-8 encoding.
The files are for sure UTF-8 encoding. I can’t get it to work on a single file. It was working before then started doing this all of the sudden.
I love this plugin and use it all the time! I really want to get this working!
Hi –
late reply, but I was on holiday :)
Okay:
– Do the other functions work?
– Could you send me one of the files (mario at chipwreck dot de)?
I’m sure this can be fixed..:)
Absolutely fantastic!
Hi, does nothing … I can set what I want, but does not work around a beautiful PHP code to create? Unfortunately, I have PHP scripts that are only in one line.
Too bad that it does not work.
I searched for example http://www.homepage-kosten.de/php_beautifier.php for Coda
The best would be if you send me the code via email (mario at chipwreck dot de), then I can look what goes wrong..
And thanks for the hint, I’ll have a look at php beautifier.
First off this is a great coda plugin. Love the way it organizes everything. One issue I came across right off the bat is the CSS minification totally breaks when you have absolute urls to background images like this:
.rendButton {
background:url(http://assets.impulsestudios.ca/site/v_sprite.png) 0 -958px repeat-x;
}
it removes the //assets.impulsestudios.ca/site/v_sprite.png) part. (I assume it has something to do with the minifier mistaking it for a comment. Anyways any site that uses a separate domain or CDN for distributing static content needs to use absolute urls.
If you use quotes, minification works correctly:
background:url('http://assets.impulsestudios.ca/site/v_sprite.png') 0 -958px repeat-x;
For the next version I’ll have a look if there’s an update of the minifier, but until then quotes should be an easy (and syntactically correct) way around this.
Mario, thanks for writing such a great plugin. I see that “Make PHP tidy more configurable” is on your todo list. I’d like to add two feature requests on that topic:
1) don’t reformat IF/ELSE statements. My coding style is quite different than the one your implementation of TIDY does.
Mine:
if(some condition)
{
//true
}
else
{
// false
}
Yours:
if
(some condition
{
// true
} else
{
// false
}
2) Add option to sort functions and classes alphabetically sort of like the way your CSS Tidy does.
Keep up the great work.
Hi –
I’m afraid that’s not possible with the current version of PHPtidy (which isn’t developed by me). See also here: http://phptidy.berlios.de/
About the IF/ELSE formatting:
That seems a bit strange, I’ll have look there.– Your example should be achieved when using the setting “Always on new line”.
– Additionally you can deselect “Fix statement brackets” to let PHPtidy leave your code alone.
(But if I find another (open source) PHP beautifier with more possibilities I could integrate it as alternative – until now I haven’t found a good alternative..)
It is removing the tags from html. How can i fix this? Please help
I meant It is removing the “span” tags inside of “div”. Will changing value of both merge-div and merge-span be necessary?
Hi –
just checked HTML Tidy with configuration “default” – a span inside div-tag is not being removed.
The “merge-div” and “merge-span” attributes are for nested divs OR spans, so they only remove divs inside divs (or spans).
So if you’ve got further problems, try to reduce the HTML-file until it’s clear – or send it to me.
Hi Mario, I have run into a few problems. I am trying to convert an illustrated book that is in greek and english. The book is about 130 pages.
I have output the HTML from InDesign and when i load it in Coda, I see that it is “compressed”. One huge blob.
1. When I try to tidy the entire file using your plugin, Coda hangs (I don’t blame it).
2. If I break the file into chunks, it works ok, but it’s difficult to reassemble the document.
3. Somewhere in all this, I’m losing some greek words. Not all, just some.
I can send you the document but it’s about 20mb..
Ideas welcome..
David
okay 20 mb is really much.. please send me a snippet with the greek parts which go missing if possible.
LOVE the plugin. My only gripe: IT seems to default to 4 spaces when you tidy php, rather than using the tab-width set in Coda (mine is two). Haven’t found a way around this.
I see – this will be fixed in the next update.
In the mean time you can fix it manually:
– Go to (your user folder)/Library/Application Support/Coda/Plug-Ins/
– Right click on “PhpPlugin.codaplugin” and select “Show Contents”
– Open the file “Contents/Resources/phptidy-coda.php”
– Change the string containing four spaces to two spaces on line 199:
$indent_char = " ";
Awesome, got it fixed. Many many thankgs.
Is there any way to minify code as it’s being published, so your local copy is readable, and the server copy is minified?
Hi –
unfortunately not (at least not with the current Coda API). There are of course ways to compress code on the server, for example this one from Google:
http://code.google.com/p/minify/
it would be nice if you could assign different file extentions to be rendered as php, example in drupal themes the main file which is mostly php ends in .theme
Hi –
well this has nothing to do with my plugin, but here’s how it goes:
In Coda, access “Settings”, then “Editor” and find “Custom Syntax Modes” at the bottom. There add a new mode, enter i.e. “theme” (without the dot) and select “PHP-HTML”, click “Ok” and done.
When using CSS tidy, it removes the last comma from the last property in the class. Is there a way to tell the CSS tidy processor to keep that last comma?
Thanks for the awesome plugin!
Hi –
I remember that was topic some months ago: http://www.chipwreck.de/blog/software/coda-php/comment-page-3/#comment-984
Just use proCSSor instead – it doesn’t have those drawbacks.
I just installed this for the PHP validation, and it’s already awesome!
The other features are probably just as cool.
Thanks!
When I run the php validation it gives me Chinese characters like this 乯祮瑡砠敲牯牳整散瑥搠楮 is there anyway to change it to english?
Okay, I had a look: This problem appears with UTF16-files.
You can try this updated version, the problem should be fixed:
http://www.chipwreck.de/downloads/php-codaplugin-3.25.zip
(Please write a comment or mail me if there are still issues)
Thank you so much for making the upgrade system automatic. The “download in a browser” method was painful. The new system is AWESOME!
Thanks again :-)
Thx – good to hear :)
Anyway to make it auto check syntax everytime we go to a new line? Great plugin!
Hi –
no that’s not possible. The Coda API does not provide any hooks for keyboard/editing actions..
Alrighty thanks! not related to your plugin, but do you know if coda allows you to follow variables to classes in other files? Like if your calling a function or a class in a php file you can get a preview of where that class/function is coming from (similar to a stack trace)?
No, unfortunately not. PHP support in Coda is just this: Syntax highlighting & auto complete (of predefined functions) & php documentation. For bigger projects or really professional PHP development currently the only choice is PHPStorm.
I absolutely love this plugin especially the HTML Tidy feature. I was wondering if you have written one for Textmate as i am using this rather than Coda. The Textmate Html Tidy is terrible.
Hello,
Great plugin – very useful.
Found a bug.
When using the “strict whitespace rules” option of the JS Lint checker, it
doesn’t seem to detect line indents correctly. For example I get “Expected ‘var’ to have an indentation at 5 instead at 1.”, but the var is already the 5th character (indented with spaces). It passes on the JSLint website, so must be a bug in either Coda or the plugin.
The strict whitespace option is useful for detecting when you wanted spaces after, say, an “if” statement, but it becomes unusable when it reports every single line as being indented incorrectly!
(Also, the title on the options page reads “JSHint” and not “JSLint”).
Just a minor thing and possibly a bug in Coda rather than your plugin.
Thanks,
Mark
Hi –
yes that’s a known bug and is already fixed in the next beta (which is online now
will be online in a few days).And JSHint is correct since the plugin uses JSHint, an updated version of JSLint – http://www.jshint.com
Ah, excellent. Thanks again!
Bug Report – PHP Tidy assumes code is valid and duplicates error and all following text into document.
example
– make a test php file
– add the following lines
Note the missing bracket in the 1st require_once.
Do PHP Tidy
Expected results – should IMHO validate first to check code CAN be tidied. Then error dialog shown OR code tidied.
Actual Results – Errors messages inserted into existing text for the error AND all subsequent errors created by the initial error along with ALL the code following each error.
The only way to get around this is to UNDO the inserts created by Tidy then fix the error, validate and then tidy.
BTW thanks for making an awesome plugin.
UGH php code insert stripped out :(
add the following lines between the php start and end tags
require_once (“testme.php”;
require_once (“anothertest.php”);
;)
That looks ugly.. very ugly.
I’ll have a look. The validation is a great idea, I think I’ll implement this for the next release (the next beta is ready
will be ready in a few days with this feature I assume).Thx!
No Problem. Glad to help.
using jstidy in 3.1 just returns no input selected…?
Have you tried it this:
– same problem with different javascript files
– checked that you haven’t accidentally selected a part of the text which is not valid javascript
– make sure the file is utf-8?
If that doesn’t help, you can also send me the file: mario at (name of this domain here).
seems to do it at home and in the office, whole file is javascript, is utf-8
video of the issue:
http://cl.ly/3K1j3S3f0S451s2t0a1i
Strange – this means JSTidy did receive either no text or no options.
So..
– Please enable debug mode (Plug-ins > PHP & Web > Preferences: Advanced)
– Open Console, try the same with two different files and send me the console lines which look like this:
Coda[…] Warning [Coda PHP Toolkit] …. more stuff
Thanks.
Interestingly, on trying to open the console, coda crashed, on restarting JSTidy worked fine.
That’s what I call unexpected :)
But if you have time: Nevertheless check what caused the coda crash, in the console and mail it to me.. would be interesting.
thx.
Sad face, nothing relevant :( You might want to try on a clean Coda, put in 3.0, restart, then put in 3.1 and try JSTidy before starting Coda up again and see if you can replicate it that way
Okay, I’ll check it. Good that it works now.
One (last) question: Did you restart coda after updating?
Initially, no
I see.. that always causes trouble. And especially: Hard to debug, strang trouble..
Same here. After opening Preferences Windows I can’t close it. Every time I try to close it, it jumps to the javascript tab.
Hi –
And: Did you have a look here (especially number three) :
http://www.chipwreck.de/blog/software/coda-php/help/#quick
If that doesn’t help, please tell me (via comment or email).
Solved by restarting Coda.
mario
Hello, is it possible to force JSLint functionality to use settings from the text /*jslint*/ directive with settings in the beginning of the file? Description is here: http://www.jslint.com/lint.html#options
Yes, this is possible…!
The current JSHint-release has added this feature just some days ago: https://github.com/jshint/jshint/pull/124
It will be included in the next version (and after some testing in a beta version, which is online now
the next days).If you have a PHP file with an XML declaration on the top of it:
the PHP validator gives an error while there isn’t one.
Yes, if the server is configured with “short_open_tag=off“:
– The XML declaration is valid on the server, where short_open_tag=off
– ..but invalid for php on your mac (commandline), where short_open_tag=on
-> You can write XML-Tags with PHP:
[...] echo "";
-> That means you have to rewrite your code
-> But your php scripts will also run on a server with a different configuration
If this is not possible, I can have look if I can add a configuration option for this.
Hi Mario!
I used the echo example on the files I was working on.
Before it was still valid PHP, no? The server is setup to suppress error (was on a production server), so that may be the reason why the program didn’t give an error.
Well.. if you *don’t* use short_open_tag=off, it gives you a syntax error – so it’s not always valid PHP, depends on the server config.
Hello!
When I tryed to use “JS Lint”, Coda crashes:
NSInvalidArgumentException – *** -[NSCFString stringByAppendingString:]: nil argument
NSExceptionHandlerExceptionRaiser (in ExceptionHandling) + 182
objc_exception_throw (in libobjc.A.dylib) + 56
+[NSException raise:format:arguments:] (in CoreFoundation) + 136
+[NSException raise:format:] (in CoreFoundation) + 58
-[NSString stringByAppendingString:] (in Foundation) + 111
-[PhpPlugin doJsLint] (in PhpPlugin) + 1753
-[NSApplication sendAction:to:from:] (in AppKit) + 112
-[NSMenuItem _corePerformAction] (in AppKit) + 435
-[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] (in AppKit) + 174
-[NSMenu _performActionWithHighlightingForItemAtIndex:] (in AppKit) + 49
-[NSMenu performKeyEquivalent:] (in AppKit) + 314
-[NSApplication _handleKeyEquivalent:] (in AppKit) + 581
-[NSApplication sendEvent:] (in AppKit) + 4858
-[NSApplication run] (in AppKit) + 917
NSApplicationMain (in AppKit) + 574
_start (in Coda) + 216
start (in Coda) + 41
0x00000002 (in Coda)
Does this (also) happen with the current beta version?
With 3.1beta it’s work fine, thanks :)
p.s. JSLint says that I have “Unsafe character” in _comments_ and I don’t find option to turn it off.
Cool – another reason to release 3.1 soon :)
The unsafe character alert has to do with the Javascript-call via Cocoa – usually happens if you use any special chars (äöü瀅). This will hopefully be fixed in 3.1 final. Until then just ignore it.
I just used Cyrillic in comment (I’m russian), so in one file can be very many “errors” about this… It’s hard to ignore :)
Thanks for very useful plugin!
I see.. The final version won’t have this bug anymore, I think in the next few days it’ll be released.
Why does this plugin constantly ask me to check for updates when I am already on the latest version?
It’s super frustrating. Other than than I love the plug-in.
You
mighthave installed multiple versions accidentally, have a look here at number three:http://www.chipwreck.de/blog/software/coda-php/help/#quick
Update: That was the problem.
Hi ChipWreck,
When reformatting a minified css file with the following in it:
….button.primary{background:-webkit-gradient(linear,left bottom,left top,color-stop(0.5,#4d148c),color-stop(1,#9578ba));background:-moz-linear-gradient(center bottom,#4d148c 50%,#9578ba 100%);}…
CSS Tidy on default setting, in the PHP & Web Toolkit Coda Plug-in, will remove needed spaces. Producing the following:
button.primary {
background:-webkit-gradient(linear,leftbottom,lefttop,color-stop(0.5,#4d148c),color-stop(1,#9578ba));
background:-moz-linear-gradient(centerbottom,#4d148c50%,#9578ba100%);
}
Notice “left bottom” became “leftbottom”.
ProCSSor does handle this situation correctly.
Yes, that’s a bug in CSStidy (also present in the online version here: http://csstidyonline.com/). Simpy use proCSSor, which also has more configuration options.
Thanks for the info and thanks for creating this plug-in.
is there a way to change the keyboard shortcut for HTML Tidy ? It’s conflicting with another shortcut for me.
Hi –
well, I could change it of course – but probably then someone else has problems :) So maybe I’ll add a configuration setting in the future.
For now: Which other shortcut is conflicting?
There’s a problem with your current JSHint integration. It ignores config headers and generates bad error reports.
For this example JS file:
/*jslint browser: true, onevar: true, undef: true, nomen: false,nomen: true eqeqeq: true, bitwise: true, regexp: true, newcap: true, immed: true */
var foo = function () {
this._stuff = ’10’;
return this._stuff;
};
Your JSHint integration returns this:
Problem at line 4 character 6: Unexpected dangling ‘_’ in ‘_stuff’.
this._stuff = ’10’;
Problem at line 5 character 13: Unexpected dangling ‘_’ in ‘_stuff’.
return this._stuff;
If you go to JSHint.com, and paste that JS code, it says:
The code check passed.
Somethings wrong hehe.
Keep up the good work ^_^
-Carlos
It depends on the settings, there’s an option to “Disallow dangling _ in identifiers” (it’s not in the online version of jshint.com, but you can find it on jslint.com) – so it’s simply a personal preference on how strict the checks should be.
I know, but check my code:
(the previous post had a typo in the options comment, but which didn’t affect the outcome, I fixed it below)
/*jslint browser: true, onevar: true, undef: true, nomen: false, eqeqeq: true, bitwise: true, regexp: true, newcap: true, immed: true */
var foo = function () {
this._stuff = ’10’;
return this._stuff;
};
There’s a “config comment header” that should tell JSHint to ignore that error (nomen: false), but that config comment header is seemingly ignored by your JSHint integration.
If you copy that code and paste it in JSHint.com, it will respect the config comment and validate my JS.
Apparently, if I change the config header to say “/*jshint browser: true, etc” it will work.
It’s a major change for anyone using the JSLint plugin hehe, because all of a sudden files will stop validating, and the default rules for validating also change. Maybe you should consider making it an option to use JSHint or JSLint.
Thanks,
Carlos
Well that would be an option of course, but since JSHint is being actively developed (and JSLint is not), I’d prefer to continue to support JSHint only – which is compatible to JSLint. So what I’ll do is to look at the default settings. Which ones do you think are unnecessarily strict?
Sorry, didn’t get notified about your reply.
I think the most unnecessarily strict one is the one that prevents using “_” before names.
The rest I can live with hehe.
Okay, you can check out 3.0 beta 2 – that was one of the improvements I already did :)
I’ve been using the 3.0 now for a bit and it’s much improved :)
Thanks for making this awesome plugin. :D
Hello,
Every time I use the PHP validator, the pop-up window stays stuck open. I have to force quit Coda and restart. Kind of annoying, is it just me?
I checked the debug mode… no more problems with that. Thank you sooooo much, this is an incredibly helpful tool, you’re awesome!
Thanks!
Just out of interest: What has been the problem?
The problem persists…
When I start Coda, I get “PHP & Web Toolkit updated to 2.7” twice. I also have 2 “validate PHP” (the same option) in in the Plug0ins drop down.
Lastly, when I do validate some PHP, the drop down saying it was valid or not either stays down and I need to restart Coda, or it saves automatically and closes the Coda window.
All of this with the debug checkbox selected in preferences. Without the debug checkbox selected it just shows the frozen valid or invalid drop down.
You have the plugin installed more than once.
This happens if you download it and have an old version in the download folder: Safari automatically renames the file, so you end up with PhpPlugin.codaplugin, PhpPlugin-2.codaplugin, etc.
To fix:
– Quit Coda
– Go to “(your user folder)/Library/Application Support/Coda/Plug-Ins”
– Delete all “PhpPlugin.codaplugin”-files
– Make sure that there are no previous versions in the Download-folder
– Download again, install
Hey,
I’m getting a few problems with version 2.7
When I try PHP Tidy I get the following error: http://screengrabs.liambowers.co.uk/94c48c2613862a26c113928088eb59e4.png
Disappeared in the current beta.
Could you please enable “Debug mode” (in the plug-in preferences), open “Console” and try it again.Every time now I start Coda, the version 2.7 of the PHP plugin every time says that PHP plugin version 2.7 has been installed and that this message will be displayed only once. :)
Solved – there were multiple versions of the plugin in the Coda Plug-ins folder (PhpPlugin.codaplugin, PhpPlugin-2.codaplugin,..).
Great plugin
I found some bug in JSLint, seems there is problem with utf-8 encoded polish strings, in this situation ‘ć’
Fatal Error
Error:
Problem at line 3 character 22: Unclosed string.
var answer = confirm(“Czy chcesz zresetowa
Yes, I see, I will fix this in the next version but this might take some time..
Until then you can either cut the characters and paste them in after validation or apply this bugfix (which in return might break the JS-Tidy function..):
– Go to (your user folder)/Library/Application Support/Coda/Plug-ins
– Right click on the “PhpPlugin.codaplugin” and choose “Show Contents”
– Navigate to Contents/Resources
– Open the file "js-call.sh" with a text editor (make a backup)
– On the last line, at the end: Replace "$myc" with "$my"
– Save file
This should help..
cool, i changed ISO8859-1 into ISO8859-2 and it works well with polish characters
Even better!
(In the future I’ll have to use another solution there, the bash-file is a workaround for problems when calling the OS X-JavaScript Interpreter – and the char conversion shouldn’t take place there..)
This should be finally fixed in the current beta now.
Hey there, me again!
I’ve some empty tags that must remain where they are and Tidy tips them off.
O tried “new-empty-tags: span” in the Plugin Preferences, but it didn’t work.
Any clue about that?
Best and tks again for this awesome plugin!
jw
HTML tidy can unfortunately only keep empty P-tags (using “drop-empty-paras: no”) – for other tags I think there’s no possibility currently..
There are some wierd things happening with the default HTML tidy, these are the things I have come across:
* It changes © to the copy write symbol
* It removed color:#FFF from inline styles in some div’s (needed for emails)
* It removed the doctype declaration.
This is the default config that comes up:
// config file for Coda PHP Toolkit Tidy FORMAT script
// http://www.chipwreck.de/blog/software/coda-php
//
// documentation is here: http://tidy.sourceforge.net/#docs
// rev 4
anchor-as-name: no
doctype: auto
drop-empty-paras: no
fix-uri: no
literal-attributes: yes
merge-divs: no
merge-spans: no
numeric-entities: no
preserve-entities: yes
quote-ampersand: no
quote-marks: no
show-body-only: no
indent: auto
indent-spaces: 4
tab-size: 4
wrap: 0
wrap-asp: no
wrap-jste: no
wrap-php: no
wrap-sections: no
tidy-mark: no
// Change these only if you need to debug a problem with Tidy
force-output: yes
quiet: yes
show-warnings: yes
Hi –
I can’t reproduce it exactly, but I’ve got an idea :)
Go the the plugin preferences, choose “Advanced” and check “Use internal” next to “HTML Tidy Binary”. And then try it again.
(If it’s already checked, please send the Tidy version shown in the Preferences -> “About”, at the bottom.)
mario
Thanks for the updated version. I will check to see if I experience any more problems and report them here.
Hi there Mario! Awesome plugin, thank you!
Just wanted to let you know that it HTML Tidy rips off HTML5 tags such as or …
Is there any way to update Tidy to make it “understand” those new tags? Are you aware of where we can find this update?
Tks a lot!
Hi –
nice to hear!
I assume the tags were also ripped of via WordPress – could you describe them without < or > ..?
HTML-tidy development is quite.. slow. Visible for example in the very, very long list of feature requests, HTML 5 support among others.
But there are possibilities to let HTML-Tidy
unknown tags, I’ll have a look the next days.mario
Modern tags like:
header
aside
footer
article
etc…
… that don’t have a closing DIV tag are ripped of, exactly because Tidy doesn’t understand why they don’t have a closing div.
Here you can see all: http://www.w3schools.com/html5/html5_reference.asp
Ie. aside closes like /aside, not /div.
Okay, here’s how it goes:
In the plugin preferences choose “custom” for the HTML Tidy configuration and add these lines:
new-blocklevel-tags: article,aside,command,canvas,dialog,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,meter
new-inline-tags: video,audio,canvas,ruby,rt,rp,time,meter,progress,datalist,keygen,mark,output,source,wbr
Now it should look like this (Note that it’s two new lines, the line break is a bit unfortunate):
I checked it with some HTML5-documents and the result was okay. It might that some of the tags are missing, I just hacked this together.
Known error: If you use a datalist-tag and inside option-tags, these are removed.
So this should help in the first place, but I’ll test it somewhat more and put it in the next release.
mario
Tks a lot Mario, worked like a charm so far! :P
I’ve been using your plugin for a while now. Much appreciated, especially for the consistent updates.
Any chance a jQuery and/or CSS3 autocomplete plugin for Coda? :)
Hi, well autocompletion is quite different from my plugin in the first place, but about CSS3 (which is partly already implemented in the latest Coda version), you’d better ask Panic.
When it comes to jQuery. You can have a look here, but since I’m an avid Mootools user (as you might see on the rest of the website :) I haven’t tried it.
Hope that helps.