Since I run a blog with mostly technical topics, that also contain code snippets, I want to make those more readable by using syntax highlighting. Many years ago, I chose a plugin that is also available on wordpress.com by default. It comes with different styles and many languages is supports. For languages that are missing, you often find an add-on plugin. Or you write your own one, which I did.
The SyntaxHighlighter Evolved plugin was initally developed by Alex Mills who passed away in 2019. Development is now continued by Automattic.
What does SyntaxHighlighter Evolved do?
As the name indicates, it is a plugin to syntax-highlight code. I use it in every blog post where I share code with you. You can use legacy shortcodes, either one per programming language like or a generic one passing the programming language like in your posts and pages. But you can also use a block and select the programming language from the block settings. You can also set other options here, like highlighting specific lines or a toggle to show line numbers.
The plugin used the syntaxhightligher from Alex Gorbatchev that is still actively maintained. It comes with two different "Hightlighter Versions": 2.x and 3.x - you can only use one at a time. I still use version 2, since it offers a "wraplines" feature I find quite useful. The package also have a version 4, but this one has not yet been integrated into the plugin.
Why do I use SyntaxHighlighter Evolved?
I regularly share code. Since I want to make it more readable, I want to use a syntaxhighlighter. I have chosen this plugin many years ago and migrating to a different one would be quite a task. But since it is not up to date with the latest version of the package, it might be time to find a replacement. It also sometimes breaks code blocks, especially if they contain HTML or some "HTML special chars" in other programming languages.
Add-ons to the plugin I use
I do use two add-ons. I have a couple of blog posts about the Apache webserver, and the highlighting for the configuration files are not in the core package. I do use the "SyntaxHighlighter Evolved: Apache" plugin here, which is not available in the WordPress.org Plugin Directory, but only on an external website. I've also blogged a lot about Sass, and there was no add-on plugin available for this language, so I created one: "SyntaxHighlighter Evolved: SASS Brush". Those add-on plugins rarely need to be updated. Only if the keywords of such a language change. For my Sass plugin, I just use the official JavaScript file with those keywords and update them in my plugin.
Conclusion
If you want to offer better readable code snippets in your posts and pages, a syntax highlighting plugin can make a huge difference. I still use a rather old one, but it still works.
Do you use a syntax highlighting plugin? Maybe you know one that offers a "wraplines" feature, and is maintained better than the one I still use. Then please share it in a comment, I would love to give it a try.