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

Do not touch quickfix list(s) on successful check #5

Closed blueyed closed 12 years ago

blueyed commented 13 years ago

checksyntax is rather spammy, when you tend to save your files often: it will move any older quickfix lists down the stack, and if there have been 10 or more checks, you'll lose e.g. you grep results.

checksyntax should not create a new quickfix list, if the syntax check succeeded - at least with the automatic mode, but also with the manual mode. When the check has been invoked manually (and succeeded), it could output an informational message instead.

tomtom commented 13 years ago

checksyntax per se doesn't do anything with qf lists. It usually calls :make though. Would it help to call :colder from CheckSyntaxSucceed(), which is called when there are no errors?

blueyed commented 13 years ago

Not really - it would still add an unusable entry to the stack..

I am experimenting with using syntastic instead, which appears to handle this better (maybe only/primarily because it is using location lists?!).

tomtom commented 13 years ago

It would add a new entry to the stack but if I understand the docs right, the next entry should overwrite that one.

I pushed a version that uses the loclist by default.

tomtom commented 12 years ago

I consider this issue closed. Not touching location/quickfix lists at all is not possible. If we wanted to switch to an older list on successes, we'd have to check if this list wasn't generated by quickfixsigns and if it isn't outdated, but this is not practical.