Vim autoformat错误

时间:2016-02-09 08:49:35

标签: vim autoformat

更新我的vim插件后,我遇到了vim autoformat插件(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包管理器安装了格式化程序,这意味着根据autoformat文档,应该意味着插件会自动检测到它们。

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

2 个答案:

答案 0 :(得分:0)

如果插件安装正确,

vim-autoformat会自动检测插件。 如果您不希望显示错误并按“输入或键入命令继续”,只需键入:silent Autoformat

答案 1 :(得分:0)

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

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