Vim:出现语法错误时如何显示错误消息?
我有一个 C 文件(或 ruby 文件),但有语法错误。当我保存时,左侧会出现一个栏,并且有一个箭头指向语法错误所在的行。我安装了 syntastic vim 插件,所以我不知道这是本机功能还是来自插件。
现在我的问题是:如何从 vim 中看到错误消息?
I have a C file (or ruby file) and I have a syntax error. When I save there is a bar that appears on the left, and an arrow pointing to the line where the syntax error is. I have the syntastic vim plugin installed so I don't know if that is a native feature or if it comes from the plugin.
Now my question is: How can I see the error message from within vim?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用
:make
构建程序,Vim 具有内置功能来显示错误,并且有自己的一组命令来处理您正在使用的编译器产生的错误。然而,syntastic 似乎绕过了这个功能并直接执行语法检查。您正在寻找的命令可能是
:Errors
。您应该阅读插件的帮助。https://github.com/scrooloose/syntastic/blob/master/doc /syntastic.txt
Vim has a built in ability to show you errors if you build a program using
:make
and has its own set of commands for working with errors produced by the compiler you are using.HOWEVER, it seems that syntastic bypasses this functionality and preforms syntactic checks directly. The command you are looking for is probably
:Errors
. You should read the help for your plugin.https://github.com/scrooloose/syntastic/blob/master/doc/syntastic.txt