On Crunchify, we published all kind of Java, Spring MVC, Apache Tomcat, WordPress tips, etc tutorials. I couldn’t even think about my site with Syntax Highlighter plugin.
It’s absolutely must for me. It’s been almost 3 years, I’m using Crayon Syntax Highlighter
plugin but there is one more which is my favorites too, which I’m using on my other blogs.
Let’s get started:
Plugin-1) Crayon Syntax Highlighter
Link:
https://wordpress.org/plugins/crayon-syntax-highlighter/
A Syntax Highlighter built in PHP and jQuery that supports customizable languages and themes. It can highlight from a URL, a local file or WordPress post text. Crayon makes it easy to manage Language files and define custom language elements with regular expressions.
Also 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.
Bonus tips:
Follow this tutorial if you would like to fine tune plugin.
Plugin-2) SyntaxHighlighter Evolved
Link:
https://wordpress.org/plugins/syntaxhighlighter/
SyntaxHighlighter Evolved allows you to easily post syntax-highlighted code to your site without losing its formatting or making any manual changes. It uses the SyntaxHighlighter JavaScript package by Alex.
There are quite a few code highlighter plugins available out there in WordPress repository but I would recommend using one of these two. Do you really think – there is better one out there? Please chime in and let me know.