如何为vim设置syntastic? [英] How to set up syntastic for vim?

查看:318
本文介绍了如何为vim设置syntastic?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我git将存储库克隆到~/.vim/bundle并安装了病原体.我可以确定病原体可以正常工作,因为捆绑包中的其他插件都可以正常工作.谷歌搜索了一段时间之后,看来syntastic应该对c代码开箱即用.我还检查了所有在syntastic/syntax_checkers/c/中指定的可执行文件.

So I git cloned the repository to ~/.vim/bundle and had pathogen installed. I can be sure pathogen works fine since my other plugins in bundle are all working fine. After googling for a while, it seems that syntastic should work out of box for c code. I also checked that I have all the executables specified in syntastic/syntax_checkers/c/.

这是我的.vimrc文件的一部分:

Here is a part of my .vimrc file:

" syntastic
let g:syntastic_auto_loc_list=1
let g:syntastic_disabled_filetypes=['html']
let g:syntastic_enable_signs=1

当我打开* .c文件并执行:SyntasticCheck时,什么都没有发生.没有错误提示无法找到命令,因此已加载了合成命令.但是,即使当前打开的* .c文件包含错误语法错误,syntastic也不会显示任何内容.

When I open a *.c file and do :SyntasticCheck, nothing happens. There is no errors complaining command not found, so syntastic is loaded. However, even if the *.c file that's currently opened contains errors syntax error, syntastic is not showing anything.

这是我第一次使用合成词,所以我真的不知道调用它的正确方法.

It is the first time I use syntastic so I don't really know the correct way to invoke it.

我也尝试了:SyntasticCheck [c],并且收到以下错误消息:

I also tried :SyntasticCheck [c] and I get the following error message:

Error detected while processing function <SNR>_22_UpdateErrors..<SNR>22_CacheErrors:
line 16:
E121: Undefined variable: checkers
E15: Invalid expression: checkers

有人可以告诉我我做错了什么以及如何调用合成句法吗? 谢谢!

Can someone tell me what I did wrong and how to invoke syntastic? Thanks!

推荐答案

我不太了解其原因,但是当我用./install.sh --clang-completer重新安装了Vim的YouCompleteMe插件时.合成作品就像魅力.

I don't really understand the reason, but when I re-installed the YouCompleteMe plugin for vim with ./install.sh --clang-completer. Syntastic works like charm.

这篇关于如何为vim设置syntastic?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆