Syntax Highlight and Format Source Code in WordPress Posts
Code Snippet 2.0 helps you easily format source code with the correct style in WordPress.
If you use Windows Live Writer then this might not interest you much as WLW has a decent support for source code syntax highlighting. But if you use Mac and use one of those blogging clients then I’m sure you’d be struggling to get the source code formatted and highlighted properly. Since WordPress doesn’t support any source code formatting by default you need extra plugins to format the source code and make it syntax highlighted.
Out of the many plugins Code Snippet 2.0 stands out in its simplicity and the ease to get the code formatted appropriately. Code Snippet 2.0 uses GeSHi syntax highlighter engine which is a very flexible and easily extendable highlighter engine.
Also, Code Snippet 2.0 supports quite a spectrum of programming languages and so for the most part you should be covered if you use any of the languages below,
actionscript
ada
apache
applescript
asm
asp
bash
caddcl
cadlisp
c_mac
c
cpp
csharp
css-gen
css
delphi
diff
div
dos
d
eiffel
freebasic
gml
html4strict
ini
inno
java
javascript
lisp
lua
matlab
mpasm
nsis
objc
oobas
oracle8
pascal
perl
php-brief
php
python
qbasic
sdlbasic
smarty
sql
vbnet
vb
vhdl
visualfoxpro
xml
Usage is pretty simple,
Download the Code Snippet 2.0 plugin.

Extract the TAR file and copy the folder “codesnippet” to your local wp-content/plugins folder.

Upload the “codesnippet” folder to your hosts wp-content/plugins folder.

Enable the Code Snippet plugin on your WordPress Plugins page.

If you’d like to have the line numbers listed on the source code then, go into your WordPress “Settings” and then to “Code Highlighting” and click on the “Show line numbers” checkbox. You can also adjust the styling if you are familiar with tweaking CSS elements.
I personally find Code Snippet 2.0 very easy to use and it does the job pretty decent. It doesn’t have too many options and flexibility but if you are looking for a simple plugin that can get the job done then Code Snippet 2.0 would be worth checking out.
Technorati Tags:
How To, WordPress, WordPress Plugins


