Picking up a WordPress CodeHighlighter Plugin

wordpress.gif

When I put code segments into a post, I've used BBEdit's Copy as XHTML function to get it out of BBEdit and into the post. It makes something that's impossible to edit in the post, but it looks nice, and it previews nice in MarsEdit. So, all-in-all, not a bad solution.

But it's not perfect.

So I decided to look for a WordPress plugin that would do a similar job, but simply, and without a ton of things I had to manage/deal with. What I found seems to be a nice little compromise between what I had and what should work really well for me. It's called WordPress:CodeHighlighterPlugin (obvious, yes) and it appears to do all the languages I can imaging and it's all just PHP code as a plugin to WordPress. Additionally, to use this you simply use the <pre> tag with an additional lang argument to indicate which language to use. You can also optionally specify line numbers to be generated and where these line numbers should start.

While this plugin doesn't allow me to preview the code in the form it will appear, it does allow me to easily edit it. So it's a trade-off. I'm not sure how much I'll use this guy, but it's loaded and it's there, and should I need it, it's nice to know that it's there. I guess I'll try it out the next time I need to put code into a post.