|about||full list||wishlist||do it yourself||version 1.5||useful links||history|
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.
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.
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.
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.
|yes||as3, actionscript3||Adobe ActionScript, used in Flex and Flash version 3, provided by Peter Atoria.|
|no||as3, actionscript3||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.|
|no||ada||Ada (after Ada Lovelace) is and has been the language of choice for the DOD in the US for decades; brush created by spatterson.|
|no||asm, x86||Assembler brush, almost full support for all x86 assembler instructions, kindly created and under active development by UN-I-QUE.|
|ASM / NASM / MASM2
|no||nasm8086, 8086, nasm, asm, masm||Provides x86 assembly instructions and NASM / MASM support; brush created by Tistory (?).|
|no||applescript||You use AppleScript to automate tasks on the Apple; brush created by David Chamber.|
|no||ahk, autohotkey||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).|
|Bash / Shell
|yes||bash, shell||Unix / Linux sh / shell / bash script for automating system tasks.|
|no||bat,batch,cmd||*.BAT and *.CMD files on Windows can contain batch file commands; brush created by Ildar Shaimordanov.|
|yes||c#, c-sharp, csharp||C# is the Lingua franca of the Microsoft .NET world.|
|yes||cpp, c||Good ole’ C++, cross platform programming, compile into native machine code.|
|no||clojure, Clojure, clj||Clojure is a modern dialect of Lisp, created by Travis Whitton.|
|no||cf, coldfusion||Adobe Coldfusion is a declarative / imperative enterprise language; brush created by Jen.|
|yes||css||Cascading Style Sheets for decorating HTML elements.|
|yes||delphi, pas, pascal||Borland Delphi, with origins in procedural Pascal, still widely used.|
|yes||diff, patch||Use this to highlight output of the commandline diff tool, i.e., for comparing two text files.|
|no||erlang, erl||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).|
|no||erlang, erl||Much improved alternative brush for Erlang by Steve Gilham, based on an improved version of his 1.5 SH Erlang brush.|
|no||f#,f-sharp, fsharp||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.|
|yes||groovy||Groovy is an object oriented alternative for the Java platform.|
|yes||java||Java, for cross-platform enterprise development: build once, run everywhere.|
|yes||jfx, javafx||Java’s (Sun’s) alternative to Flash and Silverlight, provided by Patrick Webster.|
|no||latex, tex||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.|
|no||lsl||Linden Scripting Language, used in Second Life, provided by sabro|
|no||lua||Lua is an imperative / functional interpreted scripting language; brush created by bear.mini.|
|no||lua||Alternative brush for the previous, hosted on a Korean site.|
|no||mathematica, mm||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.|
|no||matlab||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.|
|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.|
|Objective-C / Cocoa
|no||objc, obj-c||Objective-C or Cocoa, a variant of C++; brush provided by Geoffrey Byers and YoungJin Shin (v 1.5).|
|no||oxygene, prism, delphi-prism||Delphi Prism Oxygene (aka Chrome) is Delphi.NET without the burden of backward compatibility was developed by RemObjects; brush created by rgrove.|
|yes||perl, pl||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.|
|yes||php||PHP, short for Personal Home Page, is now the acclaimed widest adopted interpreted scripting language for the internet|
|no||php||Improved version of bundled PHP brush made by David Chambers, see home/info page for more info:|
|yes||plain, text||Just text, no highlighting.|
|yes||ps, powershell||Powershell is an interactive Windows commandline scripting language, brush credits for B. v. Zanten (no url).|
|no||powershell, posh, ps||Alternative brush, provided by Xenophane, created by Joel Bennett, updated by Claus T Nielsen.|
|no||processing, Processing||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|
|yes||py, python||Python is an object oriented interpreted scripting language, de facto language at Google’s.|
|no||ros||RouterOS scripts are used for scripting MikroTik routers, found here.|
|RPG / ILE-RPG
|no||rpgle, rpg4||RPG or ILE-RPG is an old language still in wide use on IBM mainframes; brush created by Loyd Goodbar.|
|yes||rails, ror, ruby||Interpreted scripting language, popular modular alternative for PHP and Perl.|
|no||sahi, sahiscript||Sahi is used for scripting web automation and web testing, brush created by V. Narayan Raman.|
|yes||scala||Multi paradigm language mainly as an alternative to Java for writing more concise code.|
|yes||sql||Structured Query Language, mainly used with databases.|
|yes||vb, vbnet||The BASIC style languages, now Visual Basic, easy to use .NET language.|
|no||yaml, yml||YAML Ain’t Markup Language, human friendly serialization standard, created by Nicolas Perriault.|
|yes||xml, xhtml, xslt, html, xhtml||eXtended Markup Language for describing data in a general way, use this brush for (X)HTML as well.|
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.
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.
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!
- The Developer’s Guide for Custom Brushes, or this alternative short tutorial.
- Learning / understanding and a reference of regular expressions.
- Trying out your regular expressions online (choose your pick).
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.
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.
|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.|
|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 to everyone for providing these brushes to the community and thanks to Alex Gorbatchev for sharing his excellent script with the world.
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).
|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 –