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

Saving of files doesn't trigger syntax check #10

Closed fidian closed 12 years ago

fidian commented 12 years ago

I have created .vim/plugins and .vim/autoload and dropped your two files inside. When vim runs and I use ":w", the syntax checker isn't being triggered. Pressing F5 does force the syntax check. Any advice?

tomtom commented 12 years ago

Whether the syntax checker is run automatically depends on the filetype. The assumption is that only quick checkers should be run automatically -- at least as long as checksyntax or vim doesn't support running commands asynchronously.

If g:checksyntax[&filetype].auto is 1 for your file, then it could be a problem.

fidian commented 12 years ago

Why isn't this set automatically based on which lint/syntax checkers are available? I'd want all of the syntax checkers enabled as long as I have the binaries installed on my system.

Sorry, that sounds harsh. Could there be an option made so that I can enable all of them in my .vimrc? let g:checksyntax_auto = 1 doesn't do this, yet I thought that would turn on automatic syntax checking where possible.

Since I'm requesting features, could there also be added a flag or something to disable automatic syntax checking? I don't see any variable that could be set via a hotkey or something so I can toggle syntax checking with F6 or another keypress. I don't yet know vim well enough to work on the config files without training wheels, otherwise I'd try to hack that in and give you a pull request.

fidian commented 12 years ago

Moving to a new issue since I can't reopen this one.