Collection of wordpress syntax highlighting plugins

January 10th, 2010 by aditia rahman / 2 Comments  

     

Some wordpress plugin enabled you to display source code in your blog post without breaking the HTML code, but there are so many plugins you can found out there. In this post I try each plugin with simple CakePHP controller syntax, and capture the result (most image is shrinked) so you can found the result of your syntax in your post using each plugin.

1. CodeColorer

Plugin based on GeSHi library, which supports most languages. CodeColorer has various nice features:

  • syntax highlighting in RSS feeds
  • syntax highlighting of single line of code (inline)
  • syntax highlighting of code in comments
  • line numbers
  • automatic links to the documentation inserting
  • code block intelligent scroll detection (short code would have short block, for long one block height would be fixed and scrollbar would appear)
  • predefined color themes (Slush & Poppies, Blackboard, Dawn, Mac Classic, Twitlight, Vibrant Ink)
  • syntax colors customization in CSS file
  • code protect from mangling by WordPress (for example, quotes, double-dashes, etc would look just right as you entered)

Visible option setting when you install it with, custom css code, custom width, custom  tab size, custom themes, line number, etc.

visit plugin site

2. Code Highlighter

This plugin is a syntax highlighter for source code. It uses GeSHi as fontifier engine. No options setting.

visit plugin site

3. CodeSnippet

It is powered by the GeSHi engine and is quite possibly the best syntax highlighting engine for WordPress. A large number of languages are supported and it can be easily extended, very simple no lines, no themes, no option but easy to use.

visit plugin site

4. Dean’s Code Highlighter

This WordPress plugin using Geshi to highlight source code in a wide range of popular languages.it aims to be a simple but powerful code highlighting plugin, no themes, no option. This plugin seems very old and discontinued.

visit plugin site

5. devformatter

Create a better display of codes on your page/blog. For everybody that publish examples, source-code and some tips about a specific language. This plugin do use of GeSHi highlight system, so you will have support for more then 110 languages, including PHP, ASP, Html, JavaScript, CSS, Java, Python, Delphi, C++, C, Visual Basic and much more. This plugin using Jquery. New features:

  • Syntax highlighting in RSS 2.0 feeds.
  • Syntax highlighting with PRE tags .
  • Syntax highlighting in comments.
  • Start line number configuration.
  • Hide toolbar for a code block.
  • CSS !important to for better style.

visit plugin site

6. Easy Google Syntax Highlighter

This plugin is an implementation of the Google Syntax Highlighter 2.0 with a front end to allow configuring all the global settings that are available. Features include selecting themes and specifying languages to highlight. Any language that is not selected will not be called by your blog which will improve page loading performance. I got some error displaying php code when adding the open and close php tag like <?php ?>.

visit plugin site

7. FV Code Highlighter

This plugin supports the highlighting of PHP, HTML, CSS and XML. The default tag-highlighter color scheme uses the same colors Adobe’s Dreamweaver is using. This makes it easy for your visitors to recognize what type of codes you wrote. These colors can be changed to your liking in the WPadmin section of your blog. No options, no line number.

visit plugin site

8. Highlight Source Pro

Powerful, flexible, XHTML-compliant, server-side code highlighting, credits for everything but ‘making it a plugin’ go to Jay Pipes and GeSHi. Features including :

  • Highlight sources of any language
  • automatically, server-side (no javascripts)
  • XHTML-Compliant, <div>, <ul>, <span> with class-attributes and a css-file are used for styling
  • optionally add a heading for every code-block
  • optionally specify line-number offset (BREAKS XHTML COMPLIANCE)
  • optionally don’t display line-numbers
  • set per-codeblock if the code is html_entity_encoded or not
  • only parses <pre>-tags with the lang=-attribute, thus does not interfere with any regular preformatted contents you might have
  • degrades beautifully through <pre>-tags (if you keep the sources clean, that is)
  • all settings through logical, valid arguments for the main container
  • comes with generic cross-browser CSS (tested: IE5.5+, FF, Safari, Opera)

visit plugin site

9. Snippet Highlight

I got some error displaying php code when adding the open and close php tag like <?php ?>.

visit plugin site

10. SyntaxHighlighter Evolved

SyntaxHighlighter Evolved allows you to easily post syntax-highlighted code to your site without having to escape the code or anything. It uses the SyntaxHighlighter JavaScript package by Alex Gorbatchev to do the highlighting and supports all of the package’s parameters via shortcode attributes. With visible option yes and other features I recommend this plugin for daily use.

visit plugin site

11. SyntaxHighlighter Plus

The result is similiar with the one above but with different code tag and without visible option setting.

visit plugin site

12.  WP-CodeBox

WP-CodeBox provides clean syntax highlighting and AJAX advanced features for embedding source code within pages or posts. It support wide range of popular languages highlighting with line numbers, code download, Copy to clipboard, collapse codebox,automatic keywords link to API manual and maintains formatting while copying snippets of code from the browser. It’s provide simple background configuration for highlighter style/formatting customization. Since the plugin is developing, in the future it will support more options.(CSS option,Keywords display style,Auto Caps/Nocaps,Case Sensitivity etc. )

visit plugin site

13. Dojox WordPress Syntax Highlighter

I got some error displaying php code when adding the open and close php tag like <?php ?>.

visit plugin site

14. WP-Syntax

WP-Syntax provides clean syntax highlighting using GeSHi — supporting a wide range of popular languages. It supports highlighting with or without line numbers and maintains formatting while copying snippets of code from the browser. It avoids conflicts with other 3rd party plugins by running an early pre-filter and a late post-filter that substitutes and pulls the code snippets out first and then pushes them back in with highlighting at the end. The result is source code formatted and highlighted the way you intended.

visit plugin site

15. WP-SynHighlight

visit plugin site

        submit to reddit Delicious

2 Comments Leave a Comment Subscribe RSS

Leave a Comment