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!
This is what you want to do:
set errorformat=ncvhdl_p:\ \*%t\\,%.%#\ (%f\\,%l\\|%c):\ %m
*
character needs to be escaped.%t
to identify a single character indicating the error type (Error/Warning/Lint).%.%#
to skip a string, like .*
in regular expressions.For more information:
:help errorformat
The setting set makeprg=cat\ example.txt
can be used as a quick way of testing the errorformat
expression if example.txt
contains a list of error lines copied from the command output.