All Syntax Highlighter 2.0 brushes collected, described and downloadable

All Syntax Highlighter 2.0 brushes collected, described and downloadable



It is rather hard to find what language syntax brushes are available that have been created to work with the excellent SyntaxHighlighter created and maintained by Alex Gorbatchev.

Note: this article is about brushes for the new SyntaxHighlighter versions 2.0 and above (download here), which are maintained by Alex Gorbatchev himself on his alexgorbatchev.com, not the older and unmaintained version that is still available through Google Code, also known as Google’s SyntaxHighlighter. When searching for the new highlighter through Google, one’s still being brought to the old Google Code site.

About the Language Brushes Overview

The original Syntax Highlighter (version 2.0.320 at the time of this writing) comes with a plethora of brushes (aka syntax scripts, syntaxes, lexers) out of the box. These brushes are well-covered with examples on the page of the Bundled Syntaxes. However, when people create their own brushes, they will not get listed there, unless Alex Gorbatchev decides to add them to his default bundle. He can’t check each and every of them, which is why he made the brushes idea to create an extensible system. People submitting brushes are invited to do so through the forum, requiring membership to post, which lists most of them on the Brushes Category page.

In this post, I’ll just make an easy overview of all standard brushes and all new brushes, adding small examples for each of them, so you have all brushes in one place. The download locations are external, as are the sites of the maintainers of these brushes. I’ve tried to be complete, but if your brush is not here or if you find a broken link, please report it here.

List of all available language brushes

Following is the list of all avalailable language brushes for the SyntaxHighligter that I could locate on the internet. For all the bundled brushes, the homepage points to the example page of that brush at alexgorbatchev.com unless it was provided by someone else, in which case I tried to located his or her brush site.

Normally you wouldn’t want to download the bundled brushes because you have them already. The provided download is to the plain non-zipped JavaScript version of the brushes, a deeplink straight into the BitBucket’s source repository of SyntaxHighlighter.

For non-bundled brushes, if I couldn’t find a homepage, I link to the forum post or simply link here (boring, I know). Most javascript (*.js) brush files have been copied here to ease downloading. I’ve notified the creators for each and every brush. If I accidentally forgot you or wasn’t able to get through one way or the other, I apologize in advance.

Any download from this site is in the public domain and free to use, alter or distribute and comes with no warranties of any kind, unless the download itself states otherwise. If you have created the original source and you don’t like it distributed here, please let me know and I remove it from the list.

Language name
(filename.js)
Bundled Aliases WP Description Home,
download
ActionScript1
(shBrushAS3.js)
yes as3, actionscript3 This language on Wikipedia Adobe ActionScript, used in Flex and Flash version 3, provided by Peter Atoria. homepage / more information check out and try it yourself download
ActionScript2
(shBrushAS3.js)
no as3, actionscript3 This language on Wikipedia Adobe ActionsScript, supports Flash 10 and is an extension to the original provided brush. This brush was originally indepently developed and later adopted for SyntaxHighlighter 2.0 by Gabriel Mariani. homepage / more information check out and try it yourselfdownload
Ada
(shBrushAda.js)
no ada This language on Wikipedia Ada (after Ada Lovelace) is and has been the language of choice for the DOD in the US for decades; brush created by spatterson. homepage / more information check out and try it yourself download
Assembler (ASM)1
(shBrushAsm.js)
no asm, x86 This language on Wikipedia Assembler brush, almost full support for all x86 assembler instructions, kindly created and under active development by UN-I-QUE. homepage / more information check out and try it yourselfdownload
ASM / NASM / MASM2
(shBrushNasm.js)
no nasm8086, 8086, nasm, asm, masm This language on Wikipedia Provides x86 assembly instructions and NASM / MASM support; brush created by Tistory (?). homepage / more information check out and try it yourself download
AppleScript
(shBrushAppleScript.js)
no applescript This language on Wikipedia You use AppleScript to automate tasks on the Apple; brush created by David Chamber. homepage / more information check out and try it yourself download
AutoHotKey
(shBrushAhk.js)
no ahk, autohotkey This language on Wikipedia AutoHotKey or AHK is a way to script and automate any application on your system, whether it supports automation or not; brush provided by mjneish (test page), probably created by “n-l-i-d” (no reference available). homepage / more information check out and try it yourself download
Bash / Shell
(shBrushBash.js)
yes bash, shell This language on Wikipedia Unix / Linux sh / shell / bash script for automating system tasks. homepage / more information check out and try it yourself download
Batch
(shBrushBat.js)
no bat,batch,cmd This language on Wikipedia *.BAT and *.CMD files on Windows can contain batch file commands; brush created by Ildar Shaimordanov. homepage / more information check out and try it yourself download
C#
(shBrushCSharp.js)
yes c#, c-sharp, csharp This language on Wikipedia C# is the Lingua franca of the Microsoft .NET  world. homepage / more information check out and try it yourself download
C++
(shBrushCpp.js)
yes cpp, c This language on Wikipedia Good ole’ C++, cross platform programming, compile into native machine code. homepage / more information check out and try it yourself download
Clojure
(shBrushClojure.js)
no clojure, Clojure, clj This language on Wikipedia Clojure is a modern dialect of Lisp, created by Travis Whitton. homepage / more information check out and try it yourself download
ColdFusion
(shBrushColdFusion.js)
no cf, coldfusion This language on Wikipedia Adobe Coldfusion is a declarative / imperative enterprise language; brush created by Jen. homepage / more information check out and try it yourself download
CSS
(shBrushCss.js)
yes css This language on Wikipedia Cascading Style Sheets for decorating HTML elements. homepage / more information check out and try it yourself download
Delphi
(shBrushDelphi.js)
yes delphi, pas, pascal This language on Wikipedia Borland Delphi, with origins in procedural Pascal, still widely used. homepage / more information check out and try it yourself download
Diff
(shBrushDiff.js)
yes diff, patch This language on Wikipedia Use this to highlight output of the commandline diff tool, i.e., for comparing two text files. homepage / more information check out and try it yourself download
Erlang1
(shBrusErlang.js)
no erlang, erl This language on Wikipedia Erlang is a GP concurrent programming language by a(mainly)  functional paradigm; brush created by Will Larson, (based on original code by Steve Gilham’s). homepage / more information check out and try it yourself download
Erlang2
(shBrushErlang2.js)
no erlang, erl This language on Wikipedia Much improved alternative brush for Erlang by Steve Gilham, based on an improved version of his 1.5 SH Erlang brush. homepage / more information check out and try it yourselfdownload
F#
(shBrushFSharp.js)
no f#,f-sharp, fsharp This language on Wikipedia F# is Microsoft’s functional language for the .NET environment; brush kindly adjusted for 2.0 by Steve Gilham based on his 1.5 version of the brush. homepage / more information check out and try it yourselfdownload
Groovy
(shBrushGroovy.js)
yes groovy This language on Wikipedia Groovy is an object oriented alternative for the Java platform. homepage / more information check out and try it yourself download
Java
(shBrushJava.js)
yes java This language on Wikipedia Java, for cross-platform enterprise development: build once, run everywhere. homepage / more information check out and try it yourself download
JavaFX
(shBrushJavaFX.js)
yes jfx, javafx This language on Wikipedia Java’s (Sun’s) alternative to Flash and Silverlight, provided by Patrick Webster. homepage / more information check out and try it yourself download
JavaScript
(shBrushJScript.js)
yes js, jscript, javascript This language on Wikipedia Known by many names: javascript, ecmascript, jscript, it’s the language to spice up your static web pages. homepage / more information check out and try it yourself download
LaTeX
(shBrushLatex.js)
no latex, tex This language on Wikipedia LaTeX and TeX are the de facto document languages in the academic and scientific community and can be used to create PDF, PS, DVI and other outputs; brush created by Jorge Martinez de Salinas. homepage / more information check out and try it yourself download
LSL
(shBrushLsl.js)
no lsl This language on Wikipedia Linden Scripting Language, used in Second Life, provided by sabro homepage / more information check out and try it yourself download
Lua1
(shBrushLua.js)
no lua This language on Wikipedia Lua is an imperative / functional interpreted scripting language; brush created by bear.mini. homepage / more information check out and try it yourself download
Lua2
(shBrushLua.js)
no lua This language on Wikipedia Alternative brush for the previous, hosted on a Korean site. homepage / more information check out and try it yourself download
Mathematica
(shBrushMathematica.js)
no mathematica, mm This language on Wikipedia Mathematica for doing mathematical calculations, plotting, computations and parallel programming, brush created by James Rohal. Note from author: the long list of functions (2200) can make the browser unresponsive when you use this brush. homepage / more information check out and try it yourself download
MATLAB1
(shBrushMatlab.js)
no matlab This language on Wikipedia MATLAB is a program and language that can be used for mathematical calculations and computations, brush created by James Rohal. Note from author: the long list of functions (1300) can make the browser unresponsive when you use this brush. homepage / more information check out and try it yourself download
MATLAB2
(shBrushMatlab.js)
no matlab Simpler MATLAB brush, which doesn’t slow down your browser, contains the most-used keywords only. Submitted by mail by Will Schleter based on James’s brush. homepage / more information check out and try it yourselfdownload
Objective-C / Cocoa
(shBrushObjectiveC)
no objc, obj-c This language on Wikipedia Objective-C or Cocoa, a variant of C++; brush provided by Geoffrey Byers and YoungJin Shin (v 1.5). homepage / more information check out and try it yourself download
Oxygene
(shBrushOxygene.js)
no oxygene, prism, delphi-prism This language on Wikipedia Delphi Prism Oxygene (aka Chrome) is Delphi.NET without the burden of backward compatibility was developed by RemObjects; brush created by rgrove. homepage / more information check out and try it yourself download
Perl
(shBrushPerl.js)
yes perl, pl This language on Wikipedia Interpreted scripting language, famous for bringing regular expressions to the masses. Original brush provided by Martin Kube of Beaver Creek Consulting, based on Nev Stokes 1.5 version. homepage / more information check out and try it yourself download
PHP1
(shBrushPhp.js)
yes php This language on Wikipedia PHP, short for Personal Home Page, is now the acclaimed widest adopted interpreted scripting language for the internet homepage / more information check out and try it yourself download
PHP2
(shBrushPhp.js)
no php This language on Wikipedia Improved version of bundled PHP brush made by David Chambers, see home/info page for more info: homepage / more information check out and try it yourself download
Plain Text
(shBrushPlain.js)
yes plain, text This language on Wikipedia Just text, no highlighting. homepage / more information check out and try it yourself download
PowerShell1
(shBrushPowerShell.js)
yes ps, powershell This language on Wikipedia Powershell is an interactive Windows commandline scripting language, brush credits for B. v. Zanten (no url). homepage / more information check out and try it yourself download
PowerShell2
(shBrushPowerShell2.js)
no powershell, posh, ps This language on Wikipedia Alternative brush, provided by Xenophane, created by Joel Bennett, updated by Claus T Nielsen. homepage / more information check out and try it yourself download
Processing
(shBrushProcessing.js)
no processing, Processing This language on Wikipedia Processing is a language for electronic arts and visual design. This brush is for the main Processing language, NOT for the Processing.js adaptation (see wishes). Brush by Sebastian Korczak homepage / more information check out and try it yourself download
Python
(shBrushPython.js)
yes py, python This language on Wikipedia Python is an object oriented interpreted scripting language, de facto language at Google’s. homepage / more information check out and try it yourself download
RouterOS
(shBrushRouterOS.js)
no ros This language on Wikipedia RouterOS scripts are used for scripting MikroTik routers, found here. homepage / more information check out and try it yourself download
RPG / ILE-RPG
(shBrushRpgle.js)
no rpgle, rpg4 This language on Wikipedia RPG or ILE-RPG is an old language still in wide use on IBM mainframes; brush created by Loyd Goodbar. homepage / more information check out and try it yourself download
Ruby
(shBrushRuby.js)
yes rails, ror, ruby This language on Wikipedia Interpreted scripting language, popular modular alternative for PHP and Perl. homepage / more information check out and try it yourself download
Sahi
(shBrushSahi.js)
no sahi, sahiscript This language on Wikipedia Sahi is used for scripting web automation and web testing, brush created by V. Narayan Raman. homepage / more information check out and try it yourself download
Scala
(shBrushScala.js)
yes scala This language on Wikipedia Multi paradigm language mainly as an alternative to Java for writing more concise code. homepage / more information check out and try it yourself download
SQL
(shBrushSql.js)
yes sql This language on Wikipedia Structured Query Language, mainly used with databases. homepage / more information check out and try it yourself download
Visual Basic
(shBrushVb.js)
yes vb, vbnet This language on Wikipedia The BASIC style languages, now Visual Basic, easy to use .NET language. homepage / more information check out and try it yourself download
YAML
(shBrushYaml.js)
no yaml, yml This language on Wikipedia YAML Ain’t Markup Language, human friendly serialization standard, created by Nicolas Perriault. homepage / more information check out and try it yourself download
XML
(shBrushXml.js)
yes xml, xhtml, xslt, html, xhtml This language on Wikipedia eXtended Markup Language for describing data in a general way, use this brush for (X)HTML as well. homepage / more information check out and try it yourself download

Couldn’t see yours? Please leave a comment with a link to your favorite highlighter or send me yours directly (abel.online at xs4all dot nl) so that I can include it.

Requested brushes and works in progress

Here’s a small list of brushes not mentioned above that I couldn’t find anywhere but that have been requested one way or the other by users of forums or blogs,  or that have not been finished yet:

Language Wished or requested by comments
ABAP Naveen Vishal @ SH forum the language in SAP.
C jimthree @ SH forum apparently, C++ brush is lacking a bit when it comes to plain C.
D phrozen10 @ old SH google code wiki after C came C++ came D.
DTD abel @ here document type definitions are used with XML, SGML and HTML to define what elements, entities etc are allowed and what not
Fortran Blake Harms @ his blog work in progress, seems to have bugs still, will include it once it’s working.
MDX Ralp @ SH forum expression language in .NET.
Processing.js abel Processing.js is an open programming language for people who want to program images, animation, and interactions for the web without using Flash or Java. A 1.5 brush is a available, I’ve kindly requested whether an upgrade is possible.
Regular Expressions zatricky @ SH forum as noted in the forum’s wish: it is a bit doubtful whether such brush would be helpful.
SCAR Vaden @ SH forum this is specific to the SCAR application, which depends on how the string starts, a partial syntax highlighter is provided at the link, along with some explanation on the syntax.
Scheme Anonymous @ bitbucket repository the mentioned anonymous user got quite far, but the implementation is not complete yet, see link for details and a usable brush (doesn’t support comments yet). As an alternative, use Closure brush.
SVG abel @ here Scalable Vector Graphics: more and more browsers (except IE of course) support it out of the box, default for XML based vector images, i.e. in XSL formatting objects (XSL-FO)
VHDL anonymous only a 1.5 version exists here, would love to have a 2.0 version for VHDL highlighting.
Whitespace fahd shariff @ old SH Google Code wiki the language Whitespace belongs to the esoteric languages, like Brainf*ck, Unlambda and the likes, it is special in such, that the compiler ignores everything except whitespace, making these programs extraordinarily hard to read.
XAML René @ here and Marcio Roberto XAML is a user interface markup language for Windows Presentation Foundation for .NET Framework 3.0 and higher and is primarily used with SilverLight development.
XPath abel XPath is widely used for selecting XML data and is used both standalone and in conjunction with XQuery and XSLT.
XQuery abel XQuery is used for querying XML data.
XSLT abel XSLT manipulates XML data from one format to another.

When a brush was provided by Alex in the distro or when I managed to locate a brush, I removed it from this wish list. Let me know (comment below) when you have some wishes yourself or when you know of one of these wishes being fulfilled.

Do it yourself

If your favorite language or syntax (doesn’t need to be a language, of course) is not provided here, you can wish for it by commenting on this post so that I can include your wish in the wish list and some day someone magically creates one and notifies you or me about it. Or…! you can Create One Yourself. It is really not that hard, but it requires a bit of understanding of regular expressions and JavaScript. If you don’t have either, you can give the details of your language (what to match to what color etc) to me and perhaps I magically create one, but don’t hold your breath, time is not always on my side :) .

Where to start? If you follow these three links you should be well on your way to your own syntax brush. Once finished, don’t forget to send it to me!

  1. The Developer’s Guide for Custom Brushes, or this alternative short tutorial.
  2. Learning / understanding and a reference of regular expressions.
  3. Trying out your regular expressions online (choose your pick).

Brushes for version 1.5

As you may have found out by now, this list is dedicated to version 2.0 of the SyntaxHighlighter, not the earlier version which is not maintained anymore (known as Google’s Code Highlighter). If you are looking for a brush for version 1.5 which is listed here, please upgrade to 2.0. It is a breeze to upgrade using the shLegacy.js file. How this is done is explained in the Upgrade Guide from 1.5 to 2.0.

An old list of supported languages for version 1.5 exists. Read through the comments to find out whether your favorite language is supported by someone for version 1.5.

Useful links

Following is a simple list of references about SyntaxHighlighter. If you have created a nice tutorial, plugin or helper program that goes together with this syntax highlighter, then drop me line, I’d be glad to add it to this overview.

reference description
7 awesome highlighters pretty, yet easy to follow overview of 7 “awesome” highlighters with a small example of each of them, Alex’s comes nr 1.
16 JS Highlighters Great overview of 16 popular javascript based syntax highlighter. Alex’s highlighter is put on top, just after the traditional GeShi highlighter.
11 syntax highlighters Simple comparison of 11 available highlighters, Alex’s highlighter is nr 2, but I believe the list is not sorted by favorite.
9 useful js highlighters Nice clean easy-to-read and follow overview of nine highlighters, puts Alex’s highlighter on top.
Best Syntax Highlighter Scott Hanselman’s of computerzen.com on his blog calls Alex’s highlighter the “Best Code Syntax Highlighter for Snippets in your Blog”.
alex gorbatchev’s home Homepage of Alex Gorbatchev, brings you straight to the download page of the SyntaxHighlighter.
download SyntaxHighlighter Direct link to the download page, you should know this one by now!
list of sites using SH Nice overview of sites using the SyntaxHighlighter, pretty big fishes there: yahoo dev network, asp.net forums, WordPress, nice!
SH forums Forums, quite actively monitored by Alex Gorbatchev himself.
list of included brushes List of brushes already included in the standard distribution, these brushes are included above as well (“bundled” column set to “yes”).
brush creation walkthrough An easy to follow brush creation tutorial, the author takes you by the hand in creating a simple owner-specified syntax and shows by each step what he does and why. Great starting point if you find the tutorial from Alex a bit too daunting still.

Thanks

Thanks to everyone for providing these brushes to the community and thanks to Alex Gorbatchev for sharing his excellent script with the world.

Donationware

It’s great that we can use software for free from people like Alex Gorbatchev. If you find his Syntaxhighlighter useful and you use it on your site, or if you get extra revenues because you use his software, please support him by sending him a donation, see his website for details.

From version 2.0.296, Alex says the following about switching to the Lesser General Public License v3, which shouldn’t keep anyone from donating him, rather the opposite, quote:

It was brought to my attention that donation clause isn’t compatible with LGPL, therefore I elected to sacrifice potential free beer to stay proper open source, which. This of course means that donations are no longer required, but desired just the same (or even more so now because even fewer people will donate).

History

2009-10-19 added alternative x86 assembler brush and an alternative MATLAB brush (without the slow loading)
2009-10-12 added F# brush and alternative Erlang brush, updated XAML request for a brush
2009-10-10 fixed Erlang brush link, thanks for mentioning!
2009-10-03 added new brush for ActionScript 3, supporting Flash 10
2009-10-02 corrected some errors in the list, added direct Wikipedia links for each language
2009-10-01 added processing brush
2009-09-30 added some requests (xaml, svg, dtd) and a useful links section
2009-09-24 layout changes, added brushes for Sahi, AHK, AppleScript
2009-09-23 update, added brushes for Lua-2, Clojure/Scheme, LSL, no luck for Fortran yet, added Mathematica, Matlab, ILE-RPG, PHP-2 and LaTeX
2009-09-22 update, added Powershell-2, Lua-1, Erlang, ASM/NASM,
2009-09-21 initial version, all bundled brushes and Batch, Yaml, Objective-C, Python, Oxygene, ColdFusion, Ada

Also see list on Topsy tweets, which keeps track of my changes.

– Abel –

http://www.rongrove.com/codeformat/Scripts/shBrushOxygene.js

Get Adobe Flash player