web development application - mac - macos

Does anyone know of an application (for mac) which will format a page of html code nicely?
ie Open the html file and indent all of the code/blocks, put character returns in and format it into sections so that it is readable rather than being just a big block of code. Then also give the ability to minimize/collapse sections of the code to make it more readable.
I've been trying Coda and Expresso - Expresso has the feature to minimize/collapse code but does not seem to be able to format code.
Please help?

TextMate is a really cool app. There are hundreds of bundles for all possible languages.

Try TACO HTML Edit
or
JEdit (Freeware)
Bye.

Try using tidy. I think it is included in OSX (at least the command is there on my system) so you won't need to install anything to use it.

I use BBEdit for this.

Textmate will do a nice job.
If you are a java or ruby programmer, Intellj or Rubymine does an excellent job of auto-formatting code(including HTML).

Related

Text editor or a standalone tool for Mac OS with ability to compress JavaScript code

Here is the task: I would like my JavaScript code from different files to be compressed and concatenated into one file that is going to be used on a web page. The problem is that I'm pretty lazy :) and using some command line tools like, for instance, Apache Ant + YUICompressor each time I add a new line of code doesn't look attractive too me. Replacing uncompressed versions with a compressed final script before release is not a great option as well.
I know that such IDE as Eclipse allow to build project automatically after each update so it is possible to use already mentioned Apache Ant and YUICompressor in a build scenario to reach my goal. However Eclipse is too geeky for me, it's not that I can't figure out how to use it, I just don't feel comfortable using it. Maybe someone knows a good alternative (for Mac OS)?
PS. I hope I don't sound too capricious :) , after all having convenient tools is rather important for a programmer.
You can get a bundle for TextMate called JavaScript Tools that contain two built-in text compressors, available at http://andrewdupont.net/2006/10/01/javascript-tools-textmate-bundle/ . TextMate is available at http://macromates.com/ .

CoffeeScript editor for MacOS

Does anybody know a good text editor for Mac that supports syntax highlighting in CoffeeScript? Is it possible to do this in TextWrangler or BBEdit?
Cheers :)
On http://jashkenas.github.com/coffee-script/ there is a list of what is available.
For Emacs there is CoffeeScript Major Mode (Emacs for mac: http://aquamacs.org/)
For Vim there is Vim CoffeeScript (Vim for mac: http://code.google.com/p/macvim/)
For Textmate there is CoffeeScript TextMate Bundle (how noted by Trevor, this is maintained by CoffeeScript creator Jeremy Ashkenas. And how noted by Chocohound, it works on Sublime Text 2 too)
For Gedit there is gedit-coffeescript
For IntelliJ IDEA and RubyMine there is coffeescript-idea
I can find nothing for TextWrangler or BBEdit.
Edit:
The list moved to the wiki and now there is an attempt to make a BBEdit plugin too ;)
As mb21 said, you can find TextWrangler instructions here.
To highlight coffeescript in Eclipse:
Download
http://www.gstaff.org/colorEditor/cbg.editor_1.2.6.jar
Download https://raw.github.com/dhotson/coffeescript-jedit/master/coffeescript.xml
Open cbg.editor_1.2.6.jar with a zip editor.
Put coffeescript.xml into the cbg.editor_1.2.6.jar\modes directory
Edit cbg.editor_1.2.6.jar\modes\catalog (it's an XML file)
Add a line for Coffeescript:
<MODE NAME="coffee" FILE="coffeescript.xml"
FILE_NAME_GLOB="*.coffee" />
Save the .jar and put it into Eclipse's plugin directory. Restart Eclipse and .coffee files should now be highlighted.
WARNING: For some reason, this plugin's default colours are TERRIFYINGLY UNUSABLE. I recommend editing the colours to the attached first, before viewing any files. Honestly, just save yourself the heartache.
TextMate have good bundle:
TextMate bundle
RubyMine / IDEA have also good plugin (but this is IDE and is crossplatform):
Idea plugin
Espresso 2 has CoffeeScript.sugar
Aptana has it now in version 3.0.4, but due to a bug with control over tabs/spaces, you'll need to install the 3.0.5 beta.
This is the beta Eclipse update site: http://preview.appcelerator.com/aptana/studio3/plugin/update/beta/
I'm pretty happy with Aptana. In my opinion, the editors for css, scss, coffeescript, html, etc. are all better than the built-in eclipse editors for these languages.
Adobe Brackets has native CoffeeScript support and the 'Interactive Linter' extension (downloadable from within the app) will even lint it to some extent, tell you that your lines are too long and so on.
However, there is no comment/uncomment keyboard shortcut, which gets old fast and there are other bugs, as you'd expect with software in such hard-development.
Worth checking out, none-the-less.
Did you give Eclipse a try?
Here's a plist file for syntax highlighting, etc, for CoffeeScript in BBEdit:
https://gist.github.com/3219871

GUI based debugger for Ruby?

Is there any GUI based debugger for Ruby? Just a debugger. I do not want a full IDE like NetBeans because they tend to get your project dirty with extra files.
thanks!
Check out Mr. Guid, which uses GTK+ and is cross-platform.
In netbeans you can tell it to put the netbeans project files in a separate directory or you can easily ignore the nbproject directory with your project's vcs. Netbeans has by far the best integrated debugging I have seen and there are many other great reasons to give it a try. Don't worry about netbeans using a project folder. I highly doubt you'll be able to find a better free GUI debugger.
If the code completion stuff gets in your way with netbeans it is easy to turn off and only request code completion when you want it (ctrl+space). That was my biggest gripe with netbeans.
I haven't used it in about a year, but I liked Arachno Ruby

BlogEngine.Net Code Formatting Extension that works?

For months now I've been trying to find a code syntax formatting extension that works for BlogEngine.Net. I'm not fond of the behavior of the default formatting extension, and have tried a couple of others (manoli is among them), but they always seem to interact badly with the TinyMCE editor. Does anyone know of an extension that works, or a different approach that will allow me to make code samples pretty on my blog without hacking the crap out of the HTML myself?
Thanks.
I would try using Windows Live Writer along w/ the Paste From Visual Studio plugin. One you go WLW, you'll never go back to that damn TinyMCE interface.
WLW here:
http://get.live.com/writer/overview
Plugin here:
http://gallery.live.com/liveItemDetail.aspx?li=d8835a5e-28da-4242-82eb-e1a006b083b9&l=8
Thanks, Rafe. Thanks to this post that Hanselman put up the day after I asked the question, I downloaded WLW and am now using it. As far as getting prettily formatted code, I'm using cut-and-paste from a little tool developed and available on manoli.net.
Check out SyntaxHighlighter.. Works excellent. For easy integration into BlogEngine have a look at my blog post.

Code syntax formatter for posting code on webpages

Is there a utility that will generate html or css for blocks of code (.net c#) when you post it on a website?
I have seen several websites with very nicely formatted code and I dont believe they do this manually.
Google prettify -
http://code.google.com/p/google-code-prettify/
I prefer Syntax Highlighter implementations (I'm using Wordpress plugin implementation for my blog).
Advantages
It is based on JavaScript and does
not care about what you have on the
server.
Posts with this formatting display
properly on different RSS feeds and
can be copied to clipboard.
It is trivial to extend syntax
rules. I'm using that to highlight
custom operators in Boo-based DSL (see sample post)
Multiple languages are supported
out-of-the-box
(source: googlecode.com)
You can get JavaScript syntax-highlighting scripts, such as this one by Dean Edwards.
This is also a jQuery version apparently based on it which looks good.
CopySourceAsHtml is an add-in for Microsoft Visual Studio 2005 that allows you to copy source code, syntax highlighting, and line numbers as HTML.
http://copysourceashtml.codeplex.com
It's highly configurable, and works much better than the download page would make you expect! Don't know if there is something similar for VS 2008
If you don't have the ability to add the google prettifier CSS reference, this would be a better way to go, as what you get is a complete HTML with the required style. I use it all the time on our developers wiki, and loving it.
An even better solution, if you don't want to bother installing anything, is to just use the little web app I wrote called BlogTrog CodeWindow:
http://www.blogtrog.com
It's easy to use. Just paste your code and embed the results.

Resources