Skip to content

Instantly share code, notes, and snippets.

@sudar
Created September 8, 2014 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sudar/f4d030dd0d82f12eca65 to your computer and use it in GitHub Desktop.
Save sudar/f4d030dd0d82f12eca65 to your computer and use it in GitHub Desktop.
Syntastic Syntax Checker for WordPress
if exists("g:loaded_syntastic_wordpress_phpcs_checker")
finish
endif
let g:loaded_syntastic_wordpress_phpcs_checker = 1
" Use PHP's phpcs checker
runtime! syntax_checkers/php/phpcs.vim
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'wordpress',
\ 'name': 'phpcs',
\ 'redirect': 'php/phpcs'})
" Register the new filetype
if exists('g:syntastic_extra_filetypes')
call add(g:syntastic_extra_filetypes, 'wordpress')
else
let g:syntastic_extra_filetypes = ['wordpress']
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment