There are other ways to achieve this but I like this method.
Using Komodo Edit – a free/open-source light code editor licensed under various licenses including GPL, LGPL, MPL.
The source code can be downloaded from: http://www.activestate.com/komodo_edit/
Install by running:
Using Komodo Edit – a free/open-source light code editor licensed under various licenses including GPL, LGPL, MPL.
The source code can be downloaded from: http://www.activestate.com/komodo_edit/
Install by running:
./install.sh
To print colour syntax-highlighted code choose File > Print > Print to HTML file and choose a html file to save it as. Opening the HTML file in a web browser will then allowing printing the code to a colour printer.