tomtom / checksyntax_vim

Check a file's syntax when saving a file (php, ruby, tex ...) with vim
http://www.vim.org/scripts/script.php?script_id=1431
GNU General Public License v3.0
94 stars 9 forks source link

checksyntax#Check isn't executed on BufWritePost #18

Closed bjauy closed 10 years ago

bjauy commented 10 years ago

Running latest version (at the moment of writing: ea318e5c1f), with Vim 7.4.135.

After starting Vim there's no error check executed when saving the file. works correctly, as does saving the files after issuing:

:au! BufWritePost * call checksyntax#Check(1)

When I change that back to #Check(0), the issue returns. It also seems to happen no matter what filetype has been declared (I've tried with JS, Perl, PHP).

I'll add more details if needed.

tomtom commented 10 years ago

Auto-checks are now disabled by default. It should work after setting g:checksyntax#autoenable rx. If it doesn't, it's a bug. Please let me know if you can solve the problem by setting it to, eg, '.' (to enable auto checks for all file types).

bjauy commented 10 years ago

Yes, it works. Thanks!

I just wonder if this change is worth mentioning somewhere in the docs.

tomtom commented 10 years ago

I added a paragraph that hopefully makes this more clear. Thanks for commenting.