views:

90

answers:

3

Hi all,

I'm looking for an auto syntax highlighter. when I specify the starting point and the ending point of the code the syntax highlighter should automatically identify the type of code (e.g. sql, vb, cs, JavaScript etc) and highlight accordingly.

Please let me know if anyone did this before, or if you know any site which does that.

I am using it for asp.net vs2008.

--vamsi

+1  A: 

I highly recommend google-code-prettify which is used here on Stack Overflow (I also use it on my blog - it is very simple to use and works well).

A Javascript module and CSS file that allows syntax highlighting of source code snippets in an html page.

Andrew Hare
can it do an auto code syntax highlighter or i need to specify what type of code is it ?
vamsivanka
By default it does a really good job figuring out what language you are using but if you want to it does allow you to specify a language.
Andrew Hare
Andrew Hare. You rock. Thank you very much.
vamsivanka
Haha - glad to help!
Andrew Hare
A: 

I use SyntaxHighlighter - it's excellent.

cxfx
but you need to define which type of code.
Brij
Yes, Syntax Highlighter is very good. But i am looking something that can do an auto syntax code type
vamsivanka
A: 

There is one very simple and powerfull jquery plugin:
http://code.google.com/p/syntaxhighlighter/

khrustalev