Tag Archives: syntax highlighting

Syntax Plugin Upgrade

I was never really thrilled with the WordPress plugins that use <pre>…</pre> for delimiting code, because of bad mojo between the WordPress editor and <pre>, specifically when the two meet the lowly < character. (Specifically, code can disappear without warning.) I detest having to tip-toe around software; humans shouldn’t have to bend to the code.

I’ve installed SyntaxHighlighter Evolved, which uses the [] notation, and doesn’t care how < is encoded.

Quick documentation can be found on WordPress’ Posting Source Code.

Setting a Language for vim Syntax Highlighting

VIM Logo
One can force the language for vim syntax highlighting with

:setf  language


For C:

:setf c

For PHP:

:setf php

For XML:

:setf xml

Update: An Alternative

In the comments below, Vladimir wrote:

Another way is :set filetype=language

Simple executing :set filetype will show current language used for syntax highlighting.

Thanks for the additional information. 🙂