Vim 在插入模式退出时禁用 make

Vim disable make on insert mode exit

我正在使用 yats (https://github.com/HerringtonDarkholme/yats.vim) 作为打字稿,它会设置 makeprg 变量,这样每次我进行更改时 vim 都会运行 make到一个文件。我想以某种方式禁用它,因为我更喜欢可以编译和 lint 的 linter 管理器 (ALE)。 关于那个地方我能做些什么吗?yats 是否需要一个选项来禁用 makeprg 的设置?

编辑: 接受的答案并没有为我的具体问题提供实际的解决方案,但是 makeprg 的解释引导我朝着正确的方向前进,这是其他插件。我将问题追溯到 YouCompleteMe。

it sets the makeprg variable, which makes it so vim runs make everytime I make a change to a file.

不,makeprg 仅定义当您或插件执行 :make.

时向 运行 发送的外部命令

此外,我在该插件中找不到任何可以 运行 :make 写入或任何其他事件的内容。下面的命令有望帮助您找到自动 make 的来源:

:verbose autocmd BufWritePost

参见 :help :verbose:help :autocmd:help BufWritePost