WordPress Vim Syntax Highlighting
Lately I have been doing a lot more work in WordPress. I primarily code in Vim, and it always bugged me there was no syntax highlighting for WordPress in Vim (or at least that I could find), so I decided to write one. I started off pulling all the functions from this page: http://codex.wordpress.org/Function_Reference. However I found this page to be pretty incomplete, so I continued to add functions to the file as I went along.
I decided to release the file to the public in case anyone is looking for WordPress syntax highlighting. Note, by no means is this file complete, but is a good base. Feel free to contact me to fill in any functions I am missing.
Find it on Github
To install, download and place in your .vim/syntax/ directory. Then load by running in vim:
:set syn=wordpress
Or place something like the following in your .vimrc file:
autocmd BufEnter *.php :set syn=wordpress
Category: Vim, Wordpress
Tags: vim wordpress syntax wordpress.vim 2 comments »
Kloppmagic.ca is the professional home of
August 29th, 2011 at 6:49 am
Awesome!. Thank for plugin.
September 25th, 2012 at 11:34 am
Thank you so much! That’s awesome. Works like a charm!