Show Formatted Source Code with Syntax Highlight

Posted September 14th, 2008 in Blog by Mason

LibG Code Viewer is a free web tool to view source code with syntax highlight.

After I finished my post How to format source code in your blog, I decided to make a small tool for anyone who post source code file on Internet. I called this tool “LibG Code Viewer“, it used the method I described in my previous blog. Here is the usage of this tool:

http://libg.org/code.php?lang=your source language&url=link to your source code

Below is the list of supported language and sample:

Language Parameter Sample
C++ cpp http://libg.org/code.php?lang=cpp&url=http://libg.org/code/sample.cpp
C# csharp http://libg.org/code.php?lang=csharp&url=http://libg.org/code/sample.cs
CSS css http://libg.org/code.php?lang=css&url=http://libg.org/code/sample.css
Delphi delphi http://libg.org/code.php?lang=delphi&url=http://libg.org/code/sample.pas
Java java http://libg.org/code.php?lang=java&url=http://libg.org/code/sample.java
Java Script js http://libg.org/code.php?lang=js&url=http://libg.org/code/sample.js
PHP php http://libg.org/code.php?lang=php&url=http://libg.org/code/sample.phpcode
Python py http://libg.org/code.php?lang=py&url=http://libg.org/code/sample.py
Ruby ruby http://libg.org/code.php?lang=ruby&url=http://libg.org/code/sample.rb
Sql sql http://libg.org/code.php?lang=sql&url=http://libg.org/code/sample.sql
VB vb http://libg.org/code.php?lang=vb&url=http://libg.org/code/sample.vb
XML/HTML xml http://libg.org/code.php?lang=xml&url=http://libg.org/code/sample.xml

You can use the form below to test LibG Code Viewer:

Language:
Source Code Link: