Tip 12Linting the Current File

The ALE plugin runs linting tools asynchronously on your buffer. Errors and warnings are marked with signs to make them easily visible, and you can quickly jump between them using the navigation commands provided. In this tip, you’ll install the ALE plugin and eslint tool and use them to find and repair errors in a sample JavaScript file. You’ll also learn how to configure ALE so that it runs your preferred linting tools for each specified filetype. And you’ll learn of various ways to configure ALE so that it runs linters when manually invoked, or automatically in response to various events.

Preparation

To follow the examples in this tip, you’ll need to install Andrew Wray’s ALE plugin.[27] ALE stands for

Get Modern Vim now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.