Skip to Content
Mastering Vim
book

Mastering Vim

by Ruslan Osipov
November 2018
Beginner
330 pages
7h 21m
English
Packt Publishing
Content preview from Mastering Vim

Using linters with Vim

A lot of common linters have associated plugins, which you can use to avoid dealing with the intricacies of each linter. However, if you have to support a custom linter, Vim lets you populate a quickfix list however you want.

You can leverage Vim's :make command, which populates a quickfix list. By default, it runs the Unix make command (no surprise here), but you can override that by setting the makeprg variable.

Quickfix expects :make output to be in a particular format, and you can try to get a linter to output in a desired format. This is error-prone, and has possible compatibility issues (if the underlying linter changes).

Add the following to your .vimrc file to override the :make behavior only when working on ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Vim

Mastering Vim

Damian Conway
Vim Masterclass

Vim Masterclass

Jason Cannon
Modern Vim

Modern Vim

Drew Neil

Publisher Resources

ISBN: 9781789341096Supplemental Content