On , I learnt ...

How to use markdownlint output in Vim’s quickfix list

The output from markdownlint-cli has this form:

path/to/file.md:13:81 MD013/line-length Line length [Expected: 80; Actual: 102]

which doesn’t load correctly into Vim’s quickfix list (via :cfile or :cexpr).

This is because the error format doesn’t match any of the scanf-style format strings in the errorformat option.

To remedy, add a new format pattern to the list:

set errorformat+=%f:%l\ %m

With this adjusted, you can work through the errors in a project using;

:cexpr system('markdownlint .')