For those who might not know, Flycheck is a plugin which checks the syntax of the code you're writing on the fly, without forcing you to save the file. It does that by periodically saving the buffer to a temporary file, and running the syntax checker on that.

This way, you get instant feedback whenever you make a mistake, just like in an IDE, and (most importantly) if you're doing live development, with your program running in the background and reloading its files whenever it detects a change, it won't crash and burn if you make a small typo or syntax error.

The plugins I've looked into (Syntastic and python-mode) only run the syntax checker on save. Is there a better alternative?

  • 2
    Some plugins such as YouCompleteMe can run syntax checks on the fly, but they can only do that for a small set of languages. Most plugins can't do that though, mainly because of limitations in Vim itself. The forthcoming Vim 8 will finally have full support for job control, and things might change then. But we aren't there yet. – lcd047 May 16 '16 at 17:21
  • 2
    On a side note: syntastic always runs checkers against the file on disk, not against the current buffer. Saving the current buffer to a temporary location and checking that wouldn't work for syntastic because some checkers are run against an entire source tree, rather than against just the current file. There are other, deeper problems involved too, that are related to limitations in Vim that Emacs doesn't have. – lcd047 May 16 '16 at 17:24

If you're using Vim 8 or Neovim, you can use Asynchronous Lint Engine.

Note that it doesn't work well with Syntastic (source):

ALE conflicts with Syntastic. Uninstall it, or disable this warning with let g:ale_emit_conflict_warnings = 0 in your vimrc file, before plugins are loaded.


You can try neomake for Neovim and Vim 8.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.