gvim tags如何支持systemverilog

本文介绍了如何生成tags文件,用于GVIM中快速跳转SystemVerilog代码。tags文件格式包含特殊行如`_TAG_FILE_SORTED`和`_TAG_FILE_FORMAT`,以及类、任务、函数等标签信息。通过编写脚本或定制ctags配置,可以解析SystemVerilog源文件生成tags,支持类、任务、函数、模块等元素的定位。

1 tags文件的格式

在gvim中敲:help tag可以查看tag的介绍,里面讲了tags的文件格式。

The first lines in the tags file can contain lines that start with
    !_TAG_
These are sorted to the first lines, only rare tags that start with "!" can
sort to before them.  Vim recognizes two items.  The first one is the line
that indicates if the file was sorted.  When this line is found, Vim uses
binary searching for the tags file:
    !_TAG_FILE_SORTED<Tab>1<Tab>{anything} 

第一行可以为:

!_TAG_FILE_SORTED<Tab>1<Tab>I am a tags file.

第二行可以为:

!_TAG_FILE_FORMAT<Tab>1<Tab>/exxtend format; --format=1 will not append;" to lines/

正文的内容格式:

1.  {tagname}        {TAB} {tagfile} {TAB} {tagaddress}
2.  {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
3.  {tagname}   &

评论 4
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值