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.
One can force the language for vim syntax highlighting with
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. 🙂