g:checksyntax#auto_mode really doesn't do what I'm expecting. The PHP syntax checker has its own 'auto' setting and I can't override that by changing g:checksyntax#auto_mode. Here's what I've added to my .vimrc:
" Turning off auto syntax checking
let g:checksyntax#auto_mode = 1
function ToggleSyntaxCheck()
if g:checksyntax#auto_mode != 0
let g:checksyntax#auto_mode = 0
echo "Toggling auto syntax check: disabled"
else
let g:checksyntax#auto_mode = 1
echo "Toggling auto syntax check: enabled"
endif
endfunction
map <F5> :call ToggleSyntaxCheck()<CR>
When I work on files that don't have their own 'auto' setting, everything now works as expected, such as editing .js files and checking with jsl. However, when I work on PHP files, they are always syntax checked. The auto_mode variable looks like it would set a default "auto check" setting (like it would be for a prototype), but this still doesn't toggle whether or not CheckSyntax is supposed to run when I save. I could have g:checksyntax#enabled = 1 by default and modify checksyntax#Check to look for that variable. Is this the approach you'd suggest?
g:checksyntax#auto_mode really doesn't do what I'm expecting. The PHP syntax checker has its own 'auto' setting and I can't override that by changing g:checksyntax#auto_mode. Here's what I've added to my .vimrc:
When I work on files that don't have their own 'auto' setting, everything now works as expected, such as editing .js files and checking with jsl. However, when I work on PHP files, they are always syntax checked. The auto_mode variable looks like it would set a default "auto check" setting (like it would be for a prototype), but this still doesn't toggle whether or not CheckSyntax is supposed to run when I save. I could have g:checksyntax#enabled = 1 by default and modify checksyntax#Check to look for that variable. Is this the approach you'd suggest?