1

更新我的 vim 插件后,我遇到了 vim 自动格式化插件 ( https://github.com/Chiel92/vim-autoformat ) 的问题。

当我运行 :Autoformat 时,出现错误:

对于 html:

Definition in 'g:formatdef_htmlbeautify' was unsuccessful.
Definition in 'g:formatdef_tidy_html' was unsuccessful.
No format definitions were successful.
Press ENTER or type command to continue

对于 C/c++:

Definition in 'g:formatdef_clangformat' was unsuccessful.
Definition in 'g:formatdef_astyle_c' was unsuccessful.
No format definitions were successful.
Press ENTER or type command to continue

我通过 apt 包管理器安装了格式化程序,这意味着根据自动格式化文档,应该意味着插件会自动检测它们。

我已经尝试重新安装插件,它没有帮助。

4

2 回答 2

0

vim-autoformat如果插件安装正确,则会自动检测它们。如果您不想显示错误并“按 ENTER 或键入命令继续”,只需键入:silent Autoformat.

于 2016-02-10T11:20:55.310 回答
0

本周我在 Debian 机器上遇到了同样的问题。

~/.vim/bundles(与 Vundle 一起安装)中删除 vim-autoformat 文件夹并再次安装(:PluginInstall)后,一切都再次按预期工作。

于 2016-02-23T19:45:39.000 回答