打印

对ctags理解的误区

[复制链接]
114|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
3月的尾巴|  楼主 | 2018-10-4 21:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
AN, se, CD, ck, go
一开始我没有下载ctags-5.8,但是当我cd到myprojec目录下,然后ctags -R的时候,仍然产生了一个tags文件.当我打开myprojec目录下的一个c文件,然后将光标放在一个函数上,按下ctrl+]预想着它会跳转到函数定义处,但是结果是:

E433: No tags file

E426: tag not found: MyClassName

我以为是ctags程序本身有问题.实际上是我运行的ctags命令来自于ubuntu已经安装好的ex...ctags.

后来我重新下载了ctags-5.8,编译安装了一下,然后cd到myprojec目录下,运行!ctags -R,产生了一个ctags命令.然后在用vim打开一个c文件后,set一下:set tags=tags;/

原因是:stackover flow上是这么说的:

This will check the current folder for tags file and keep going one directory up all the way to the root folder. SO you can be in any sub-folder in your project and it'll be able to find the tags files.

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

433

主题

433

帖子

0

粉丝