1

I am trying to set up my Vim environment, to be able to compile VHDL code by using the Cadence VHDL Compiler (ncvhdl). However, my errorformat string is not working properly. A typical ncvhdl error line is:

ncvhdl_p: *E,EXPBEG (tc_lg_and2-rtl-a.vhd,3|34): expecting the
reserved word 'BEGIN' [1.2].

I am setting the errorformat to:

set errorformat=ncvhdl_p:\ *E\\,%m\ (%f\\,%l\|%c)

Any hints out there? Thanks!

4

1 回答 1

0

这就是你想要做的:

set errorformat=ncvhdl_p:\ \*%t\\,%.%#\ (%f\\,%l\\|%c):\ %m
  • *角色需要转义。
  • 用于%t标识指示错误类型的单个字符(E rror/ W arning/ L int)。
  • 用于%.%#跳过字符串,就像.*在正则表达式中一样。

了解更多信息:

:help errorformat

如果包含从命令输出复制的错误行列表,则该设置set makeprg=cat\ example.txt可用作测试errorformat表达式的快速方法。example.txt

于 2015-02-11T16:12:37.593 回答