Created
September 8, 2014 16:44
-
-
Save sudar/f4d030dd0d82f12eca65 to your computer and use it in GitHub Desktop.
Syntastic Syntax Checker for WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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