On , I learnt ...

How to get Vale to work with Vim’s Ale plugin

Vale is an extensible syntax aware linter. It can integrate with Vim via Ale although there’s a gotcha to be aware of.

Vale’s config file uses globs to determine which formats to apply. E.g.

[posts/*.md]
BasedOnStyles = Vale, write-good, proselint

However, by default, Ale lint files by running each linter on a temporary copy of the file which has a different path. This means the above glob doesn’t match and Vale finds no errors.

To work around this, it’s best to avoid folders your .vale.ini globs:

[*.md]
BasedOnStyles = Vale, write-good, proselint

as this will match temporary files (that still have a .md extension).

Further reading: