Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What could I use to print javascript, php or css code in colour? I've tried the following:

  1. Textmate
  2. Dreamweaver CS3
  3. Firefox viewsource extension
  4. saving webpage as a pdf

All of these result in black and white code. It seems such a fundamental thing and most Windows text editors have this basic functionality. Has anyone got anything that can do this in OS X?

share|improve this question
add comment

4 Answers

up vote 2 down vote accepted

Have you tried TextWrangler or its big brother, BBEdit from Bare Bones Software?

share|improve this answer
    
textwrangler saves the day :) cool little editor. –  Pickledegg Oct 13 '09 at 10:39
add comment

I know for a fact Netbeans can do this, and it is multiplatform. It can also save the code as a webpage with syntax highlighting that you can print.

share|improve this answer
    
thanks that man :) –  Pickledegg Oct 13 '09 at 10:41
add comment

Vim/Gvim has no problem with printing syntax highlighting. Just pick some nice colour scheme (preferably with a white background) and :hardcopy.

share|improve this answer
    
i thank you for your help, unfortunately I'm not quite at geek factor 9 yet, so I've chosen a laymans tool :p –  Pickledegg Oct 13 '09 at 10:40
    
oh, i don't mind ... i also thought gvim was a little weird before i started using it ... then after picking out my brain, and putting it a new one and completely reprogramming it, i now happily use it everyday :) –  ldigas Oct 15 '09 at 17:17
add comment

Xcode and Dashcode will preserve the syntax highlighting when printing and copying to the clipboard.

share|improve this answer
    
cool i'll check out dashcode, although it appears to have vanished from my os. :) –  Pickledegg Oct 13 '09 at 10:41
    
@Pickledegg: You'll have to have the Developer Tools installed. They come as an optional install on the Mac OS X installation disc. Alternatively, you can download them from developer.apple.com/technology/Xcode.html (free ADC membership required). –  Steve Harrison Oct 13 '09 at 22:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.