Personal tools
You are here: Home GNU/Linux Debian Code Highlighter
Log in


Forgot your password?
New user?
 

Code Highlighter

by Srecko Toroman last modified Nov 02, 2008 10:02 PM

Occasionally I post some code here, such are scripts or Java programs, and I want them to be colorized, i.e. I want keywords to be distinct from other parts.

For this purpose I use code2html package. Installing it under Debian is no problem by any mean:

# aptitude install code2html

Then I execute following command from the terminal

$ code2html script.sh | xclip

Code is now in the X selection buffer and I can paste it anywhere (to this site) with a middle mouse button click. But don't select anything else or you will lose the HTML. A very weird X feature, but it can be useful.

There are currently no items in this folder.

Document Actions
« November 2009 »
November
MoTuWeThFrSaSu
1
2345678
9101112131415
16171819202122
23242526272829
30